Bug 779358 - Change click handler back to use capture. r=cjones
authorCervantes Yu <cyu@mozilla.com>
Mon, 27 Aug 2012 14:27:41 +0800
changeset 103537 a684417d8536290f830eb71ddeb3f217c00df2c8
parent 103536 caffdfa95b07527ab8c091ba7a533aac81e96964
child 103538 4a20b03e608d46190258a51a5651ff8bed135366
child 103574 49aded7afc77808e3e6c6917e9fe0cc48d3e376f
push id14025
push userechou@mozilla.com
push dateMon, 27 Aug 2012 06:28:36 +0000
treeherdermozilla-inbound@a684417d8536 [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)