Bug 1341031 - Fix releasing drag capture for popups. r?mconley
MozReview-Commit-ID: 5dxGEtuQPK2
--- 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.