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 105558 8f79f5a6b073634badf0a1ae1f575bc93fff53ee
parent 105557 9a19aeacd593c9ae697782318181e672350e99e5
child 105559 6bf3ae02890edbd368c03e13f9cb16a2791fad55
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)