We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 229cdb7 commit bdc774eCopy full SHA for bdc774e
packages/web-components/src/components/menu/menu.ts
@@ -209,6 +209,10 @@ class CDSMenu extends HostListenerMixin(LitElement) {
209
if (e.key === 'Escape' || (!isRoot && e.key === 'ArrowLeft')) {
210
this.dispatchCloseEvent(e);
211
} else {
212
+ // Prevent scrolling when navigating menu items
213
+ if (e.key === 'ArrowUp' || e.key === 'ArrowDown') {
214
+ e.preventDefault();
215
+ }
216
this._focusItem(e);
217
}
218
};
0 commit comments