Bug 1341031 - Fix releasing drag capture for popups. r=mconley
authorMark Banner <standard8@mozilla.com>
Mon, 20 Feb 2017 13:41:34 +0000
changeset 373055 2cec05d38d05cd69de0edf6b4454c8ba1cdc61cf
parent 373054 bbcdd2f20a7db6755eb8d81b05f4f9f7b2c18fef
child 373056 2ad5216e9145d3f9941fe005237db8fad4365126
push id10863
push userjlorenzo@mozilla.com
push dateMon, 06 Mar 2017 23:02:23 +0000
treeherdermozilla-aurora@0931190cd725 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
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.