mirror of https://github.com/status-im/consul.git
ui: Enable keyboard access for the sorting dropdown menus (#8267)
This commit is contained in:
parent
aa48d29191
commit
136decd2e8
|
@ -82,9 +82,10 @@ export default Component.extend({
|
|||
// TODO: We need to use > somehow here so we don't select submenus
|
||||
const $items = [...this.dom.elements(MENU_ITEMS, this.$menu)];
|
||||
if (!this.expanded) {
|
||||
this.$trigger.dispatchEvent(new MouseEvent('click'));
|
||||
if (e.keyCode === ENTER || e.keyCode === SPACE) {
|
||||
$items[0].focus();
|
||||
next(() => {
|
||||
$items[0].focus();
|
||||
});
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<div class="popover-select" ...attributes>
|
||||
<PopoverMenu @keyboardAccess={{false}}>
|
||||
<PopoverMenu>
|
||||
<BlockSlot @name="trigger">
|
||||
<span>
|
||||
{{selected.value}}
|
||||
|
|
Loading…
Reference in New Issue