From 4fcc5938981e34814f69c7f2a2bb383d7cd6af56 Mon Sep 17 00:00:00 2001 From: jeramysoucy Date: Tue, 12 Jul 2022 11:00:51 +0200 Subject: [PATCH] Adjuted focus behavior in popover. Rebased to use EUI 60.1.2 --- .../public/nav_control/components/spaces_menu.tsx | 14 +++++++------- .../public/nav_control/nav_control_popover.tsx | 4 ++-- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/x-pack/plugins/spaces/public/nav_control/components/spaces_menu.tsx b/x-pack/plugins/spaces/public/nav_control/components/spaces_menu.tsx index fab2f37f741b0da..9a2c866eb168d96 100644 --- a/x-pack/plugins/spaces/public/nav_control/components/spaces_menu.tsx +++ b/x-pack/plugins/spaces/public/nav_control/components/spaces_menu.tsx @@ -102,7 +102,7 @@ class SpacesMenuUI extends Component { noMatchesMessage={noSpacesMessage} emptyMessage={noSpacesMessage} options={spaceMenuOptions} - singleSelection={true} + singleSelection="always" style={{ width: 300 }} onChange={this.spaceSelectionChange} listProps={{ @@ -164,17 +164,17 @@ class SpacesMenuUI extends Component { if (event.shiftKey) { // Open in new window, shift is given priority over other modifiers - // console.log(`**** SHIFT CLICK`); - window.open(urlToSelectedSpace); + console.log(`**** SHIFT CLICK`); + // window.open(urlToSelectedSpace); } else if (event.ctrlKey || event.metaKey) { // Open in new tab - either a ctrl click or middle mouse button - // console.log(`**** CTRL/CMD CLICK`); - window.open(urlToSelectedSpace, '_blank'); // '_blank' causes new tab + console.log(`**** CTRL/CMD CLICK`); + // window.open(urlToSelectedSpace, '_blank'); // '_blank' causes new tab } else { // Force full page reload (usually not a good idea, but we need to in order to change spaces) // console.log(`**** URL: ${urlToSelectedSpace}`); - // console.log(`**** NORMAL CLICK`); - this.props.navigateToUrl(urlToSelectedSpace); + console.log(`**** NORMAL CLICK`); + // this.props.navigateToUrl(urlToSelectedSpace); } } }; diff --git a/x-pack/plugins/spaces/public/nav_control/nav_control_popover.tsx b/x-pack/plugins/spaces/public/nav_control/nav_control_popover.tsx index 76a1ffb8f7c59f9..514eef0cc68ffdb 100644 --- a/x-pack/plugins/spaces/public/nav_control/nav_control_popover.tsx +++ b/x-pack/plugins/spaces/public/nav_control/nav_control_popover.tsx @@ -113,9 +113,9 @@ export class NavControlPopover extends Component { anchorPosition={this.props.anchorPosition} panelPaddingSize="none" repositionOnScroll - ownFocus={false} + // ownFocus={false} > - {element} + {element} ); }