Bug 1341031 - Fix releasing drag capture for popups. r=mconley
authorMark Banner <standard8@mozilla.com>
Mon, 20 Feb 2017 13:41:34 +0000
changeset 343980 2cec05d38d05cd69de0edf6b4454c8ba1cdc61cf
parent 343979 bbcdd2f20a7db6755eb8d81b05f4f9f7b2c18fef
child 343981 2ad5216e9145d3f9941fe005237db8fad4365126
push id37711
push usermbanner@mozilla.com
push dateTue, 21 Feb 2017 16:17:04 +0000
treeherderautoland@2cec05d38d05 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmconley
bugs1341031
milestone54.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
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.