Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: subscriptionLink.postload.js

Issue 29338592: Issue 3828 - Ignore simulated clicks on abp:subscribe links (Closed)
Patch Set: Created March 17, 2016, 8:43 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: subscriptionLink.postload.js
===================================================================
--- a/subscriptionLink.postload.js
+++ b/subscriptionLink.postload.js
@@ -29,6 +29,10 @@
if (event.button == 2)
return;
+ // Ignore simulated clicks.
+ if (event.isTrusted == false)
+ return;
+
// Search the link associated with the click
var link = event.target;
while (!(link instanceof HTMLAnchorElement))
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld