jenkins-bot has submitted this change and it was merged.

Change subject: Don't close PopupToolGroups when the scroll bar is clicked
......................................................................


Don't close PopupToolGroups when the scroll bar is clicked

This bug was fixed in MenuWidget, but PopupToolGroup's mouseup
handler was aggressively closing the menu. Instead, only
close the menu when an actual tool was selected.

This duplicates code from the parent class because I couldn't
come up with a better way to do this offhand.

Bug: 65774
Change-Id: Ib645f95aff23b559f48af2f8221751c95769a594
---
M src/toolgroups/PopupToolGroup.js
1 file changed, 3 insertions(+), 1 deletion(-)

Approvals:
  Trevor Parscal: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/src/toolgroups/PopupToolGroup.js b/src/toolgroups/PopupToolGroup.js
index b76a025..811695c 100644
--- a/src/toolgroups/PopupToolGroup.js
+++ b/src/toolgroups/PopupToolGroup.js
@@ -104,7 +104,9 @@
  */
 OO.ui.PopupToolGroup.prototype.onPointerUp = function ( e ) {
        // e.which is 0 for touch events, 1 for left mouse button
-       if ( !this.isDisabled() && e.which <= 1 ) {
+       // Only close toolgroup when a tool was actually selected
+       // FIXME: this duplicates logic from the parent class
+       if ( !this.isDisabled() && e.which <= 1 && this.pressed && this.pressed 
=== this.getTargetTool( e ) ) {
                this.setActive( false );
        }
        return OO.ui.PopupToolGroup.super.prototype.onPointerUp.call( this, e );

-- 
To view, visit https://gerrit.wikimedia.org/r/172933
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib645f95aff23b559f48af2f8221751c95769a594
Gerrit-PatchSet: 2
Gerrit-Project: oojs/ui
Gerrit-Branch: master
Gerrit-Owner: Catrope <[email protected]>
Gerrit-Reviewer: Trevor Parscal <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to