Werdna has uploaded a new change for review. https://gerrit.wikimedia.org/r/141371
Change subject: Hide drop down menus when an item is clicked ...................................................................... Hide drop down menus when an item is clicked Change-Id: Id1fef3436b214167ad4ca6696151235572b65564 --- M modules/new/components/flow-board.js 1 file changed, 10 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Flow refs/changes/71/141371/1 diff --git a/modules/new/components/flow-board.js b/modules/new/components/flow-board.js index a9ce5cf..f506179 100644 --- a/modules/new/components/flow-board.js +++ b/modules/new/components/flow-board.js @@ -1014,7 +1014,8 @@ */ FlowBoardComponent.UI.events.onToggleHoverMenu = function ( event ) { var $this = $( event.target ), - $menu = $this.closest( '.flow-menu' ); + $menu = $this.closest( '.flow-menu' ), + $dropDown = $this.closest( '.flow-ui-button-container' ); if ( event.type === 'click' ) { // If the caret was clicked, toggle focus @@ -1025,6 +1026,14 @@ if ( $menu.hasClass( 'focus' ) ) { $menu.find( '.flow-menu-js-drop' ).find( 'a' ).focus(); } + } else if ( $dropDown.length ) { + if ( $( event.target ).is( 'a' ) ) { + // Somebody clicked one of the menu items + // Force the drop down menu to go away for a small + // time so that it disappears + $dropDown.css( 'display', 'none' ); + setTimeout( function() { $dropDown.css( 'display', '' ); }, 200 ); + } } } else if ( event.type === 'focusin' ) { // If we are focused on a menu item, open the whole menu -- To view, visit https://gerrit.wikimedia.org/r/141371 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id1fef3436b214167ad4ca6696151235572b65564 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Flow Gerrit-Branch: frontend-rewrite Gerrit-Owner: Werdna <agarr...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits