Skip to content

Commit

Permalink
Adjuted focus behavior in popover. Rebased to use EUI 60.1.2
Browse files Browse the repository at this point in the history
  • Loading branch information
jeramysoucy committed Jul 13, 2022
1 parent 58d64bf commit 4fcc593
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ class SpacesMenuUI extends Component<Props> {
noMatchesMessage={noSpacesMessage}
emptyMessage={noSpacesMessage}
options={spaceMenuOptions}
singleSelection={true}
singleSelection="always"
style={{ width: 300 }}
onChange={this.spaceSelectionChange}
listProps={{
Expand Down Expand Up @@ -164,17 +164,17 @@ class SpacesMenuUI extends Component<Props> {

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);
}
}
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,9 @@ export class NavControlPopover extends Component<Props, State> {
anchorPosition={this.props.anchorPosition}
panelPaddingSize="none"
repositionOnScroll
ownFocus={false}
// ownFocus={false}
>
<EuiFocusTrap>{element}</EuiFocusTrap>
{element}
</EuiPopover>
);
}
Expand Down

0 comments on commit 4fcc593

Please sign in to comment.