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

Unified Diff: include.postload.js

Issue 6224757330542592: Issue 1603 - Register events for "Block element" with capturing (Closed)
Patch Set: Created Nov. 24, 2014, 5:05 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: include.postload.js
===================================================================
--- a/include.postload.js
+++ b/include.postload.js
@@ -270,20 +270,20 @@
addElementOverlay(elts[i]);
clickHide_activated = true;
- document.addEventListener("mouseover", clickHide_mouseOver, false);
- document.addEventListener("mouseout", clickHide_mouseOut, false);
- document.addEventListener("click", clickHide_mouseClick, false);
- document.addEventListener("keydown", clickHide_keyDown, false);
+ document.addEventListener("mouseover", clickHide_mouseOver, true);
+ document.addEventListener("mouseout", clickHide_mouseOut, true);
+ document.addEventListener("click", clickHide_mouseClick, true);
+ document.addEventListener("keydown", clickHide_keyDown, true);
}
// Called when user has clicked on something and we are waiting for confirmation
// on whether the user actually wants these filters
function clickHide_rulesPending() {
clickHide_activated = false;
- document.removeEventListener("mouseover", clickHide_mouseOver, false);
- document.removeEventListener("mouseout", clickHide_mouseOut, false);
- document.removeEventListener("click", clickHide_mouseClick, false);
- document.removeEventListener("keydown", clickHide_keyDown, false);
+ document.removeEventListener("mouseover", clickHide_mouseOver, true);
+ document.removeEventListener("mouseout", clickHide_mouseOut, true);
+ document.removeEventListener("click", clickHide_mouseClick, true);
+ document.removeEventListener("keydown", clickHide_keyDown, true);
}
// Turn off click-to-hide
@@ -308,10 +308,10 @@
clickHide_filters = null;
if(!document)
return; // This can happen inside a nuked iframe...I think
- document.removeEventListener("mouseover", clickHide_mouseOver, false);
- document.removeEventListener("mouseout", clickHide_mouseOut, false);
- document.removeEventListener("click", clickHide_mouseClick, false);
- document.removeEventListener("keydown", clickHide_keyDown, false);
+ document.removeEventListener("mouseover", clickHide_mouseOver, true);
+ document.removeEventListener("mouseout", clickHide_mouseOut, true);
+ document.removeEventListener("click", clickHide_mouseClick, true);
+ document.removeEventListener("keydown", clickHide_keyDown, true);
// Remove overlays
// For some reason iterating over the array returend by getElementsByClassName() doesn't work
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld