Catrope has uploaded a new change for review.
https://gerrit.wikimedia.org/r/172933
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: 73284
Change-Id: Ib645f95aff23b559f48af2f8221751c95769a594
---
M src/toolgroups/PopupToolGroup.js
1 file changed, 3 insertions(+), 1 deletion(-)
git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/33/172933/1
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: newchange
Gerrit-Change-Id: Ib645f95aff23b559f48af2f8221751c95769a594
Gerrit-PatchSet: 1
Gerrit-Project: oojs/ui
Gerrit-Branch: master
Gerrit-Owner: Catrope <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits