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 105573 a684417d8536290f830eb71ddeb3f217c00df2c8
parent 105572 caffdfa95b07527ab8c091ba7a533aac81e96964
child 105574 49aded7afc77808e3e6c6917e9fe0cc48d3e376f
child 105577 4a20b03e608d46190258a51a5651ff8bed135366
push id55
push usershu@rfrn.org
push dateThu, 30 Aug 2012 01:33:09 +0000
reviewerscjones
bugs779358
milestone17.0a1
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)