Bug 779358 - Change click handler back to use capture. r=cjones
☠☠ backed out by 6bf3ae02890e ☠ ☠
authorEric Chou <echou@mozilla.com>
Mon, 27 Aug 2012 11:18:14 +0800
changeset 103525 8f79f5a6b073634badf0a1ae1f575bc93fff53ee
parent 103524 9a19aeacd593c9ae697782318181e672350e99e5
child 103526 6bf3ae02890edbd368c03e13f9cb16a2791fad55
push id23355
push userMs2ger@gmail.com
push dateMon, 27 Aug 2012 08:52:59 +0000
treeherdermozilla-central@5c49d6790357 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerscjones
bugs779358
milestone17.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 779358 - Change click handler back to use capture. r=cjones
dom/browser-element/BrowserElementScrolling.js
--- a/dom/browser-element/BrowserElementScrolling.js
+++ b/dom/browser-element/BrowserElementScrolling.js
@@ -25,17 +25,17 @@ const ContentPanning = {
         break;
       case 'click':
         evt.stopPropagation();
         evt.preventDefault();
         
         let target = evt.target;
         let view = target.ownerDocument ? target.ownerDocument.defaultView
                                         : target;
-        view.removeEventListener('click', this, false, true);
+        view.removeEventListener('click', this, true, true);
         break;
     }
   },
 
   position: new Point(0 , 0),
 
   onTouchStart: function cp_onTouchStart(evt) {
     this.dragging = true;
@@ -78,17 +78,17 @@ const ContentPanning = {
 
     this.onTouchMove(evt);
 
     let click = evt.detail;
     if (this.target && click && (this.panning || this.preventNextClick)) {
       let target = this.target;
       let view = target.ownerDocument ? target.ownerDocument.defaultView
                                       : target;
-      view.addEventListener('click', this, false, true);
+      view.addEventListener('click', this, true, true);
     }
 
     if (this.panning)
       KineticPanning.start(this);
   },
 
   onTouchMove: function cp_onTouchMove(evt) {
     if (!this.dragging || !this.scrollCallback)