ui: Enable keyboard access for the sorting dropdown menus (#8267)
This commit is contained in:
parent
239d42ebd3
commit
5b4c3057a5
|
@ -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