Bug 716447 - Remove setCapture/releaseCapture from touch.js as it interfere with mouse events r=vingtetun
authorTim Guan-tin Chien <tchien@mozilla.com>
Mon, 09 Jan 2012 15:29:31 +0100
changeset 85260 b6c60a28454d68d2bab7899c164ca8205dc8e5ed
parent 85259 a85cf7f0d235e543276ec1cedd118da02c190bc1
child 85261 7ab4f1ebc7cc60fd22cf6def3819798417918bb6
push id805
push userakeybl@mozilla.com
push dateWed, 01 Feb 2012 18:17:35 +0000
treeherdermozilla-aurora@6fb3bf232436 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersvingtetun
bugs716447
milestone12.0a1
Bug 716447 - Remove setCapture/releaseCapture from touch.js as it interfere with mouse events r=vingtetun
b2g/chrome/content/touch.js
--- a/b2g/chrome/content/touch.js
+++ b/b2g/chrome/content/touch.js
@@ -81,17 +81,16 @@
       let eventTarget = this.target;
       let type = '';
       switch (evt.type) {
         case 'mousedown':
           debug('mousedown:');
 
           this.target = evt.target;
           this.timestamp = evt.timeStamp;
-          evt.target.setCapture(false);
 
           preventMouseEvents = false;
           canPreventMouseEvents = true;
           isNewTouchAction = true;
 
           contextMenuTimeout =
             this.sendContextMenu(evt.target, evt.pageX, evt.pageY, 2000);
           this.startX = evt.pageX;
@@ -121,27 +120,25 @@
           break;
 
         case 'mouseup':
           if (!eventTarget)
             return;
           debug('mouseup:');
 
           window.clearTimeout(contextMenuTimeout);
-          eventTarget.ownerDocument.releaseCapture();
           this.target = null;
           type = 'touchend';
           break;
 
         case 'unload':
           if (!eventTarget)
             return;
 
           window.clearTimeout(contextMenuTimeout);
-          eventTarget.ownerDocument.releaseCapture();
           this.target = null;
           TouchEventHandler.stop();
           return;
 
         case 'click':
           if (!isNewTouchAction) {
             debug('click: cancel');