Bug 1341031 - Fix releasing drag capture for popups. r?mconley draft
authorMark Banner <standard8@mozilla.com>
Mon, 20 Feb 2017 13:41:34 +0000
changeset 487053 beb5316322f39e95ce6e1a159fe1e649ebbfe7d3
parent 486941 c3cbadc5d2fa0adde48cbe48ed46cd0a5f7ec2bb
child 546367 84bb307756e4e961db341d8bd32c8935a4f3d0a9
push id46115
push userbmo:standard8@mozilla.com
push dateMon, 20 Feb 2017 13:42:03 +0000
reviewersmconley
bugs1341031
milestone54.0a1
Bug 1341031 - Fix releasing drag capture for popups. r?mconley MozReview-Commit-ID: 5dxGEtuQPK2
toolkit/content/widgets/popup.xml
--- a/toolkit/content/widgets/popup.xml
+++ b/toolkit/content/widgets/popup.xml
@@ -717,17 +717,17 @@
         this._clearScrollTimer();
 
         // If the user released the mouse before the popup opens, we will
         // still be capturing, so check that the button is still pressed. If
         // not, release the capture and do nothing else. This also handles if
         // the dropdown was opened via the keyboard.
         if (!(event.buttons & 1)) {
           this._draggingState = this.NOT_DRAGGING;
-          menupopup.releaseCapture();
+          this.releaseCapture();
           return;
         }
 
         // If dragging outside the top or bottom edge of the popup, but within
         // the popup area horizontally, scroll the list in that direction. The
         // _draggingState flag is used to ensure that scrolling does not start
         // until the mouse has moved over the popup first, preventing scrolling
         // while over the dropdown button.