diff --git a/src/components/dropdown/Dropdown.js b/src/components/dropdown/Dropdown.js
index 1b238008..344dcb44 100644
--- a/src/components/dropdown/Dropdown.js
+++ b/src/components/dropdown/Dropdown.js
@@ -75,8 +75,9 @@ export class LeuDropdown extends LeuElement {
}
}
- async _keyUpToggleHandler(event) {
+ async _keyDownToggleHandler(event) {
if (["ArrowDown", "ArrowUp", "Home", "End"].includes(event.key)) {
+ event.preventDefault()
const menu = this._getMenu()
const menuItems = menu.getMenuItems()
@@ -144,7 +145,7 @@ export class LeuDropdown extends LeuElement {
expanded=${this.expanded ? "true" : "false"}
?active=${this.expanded}
@click=${this._handleToggleClick}
- @keyup=${this._keyUpToggleHandler}
+ @keydown=${this._keyDownToggleHandler}
>
${hasIcon ? html`` : nothing}
${this.label}
${icon ? html`` : nothing}
+ OGD Ressource
Als CSV Tabelle
Als XLS Tabelle
diff --git a/src/components/menu/Menu.js b/src/components/menu/Menu.js
index c0f093ce..a350a86d 100644
--- a/src/components/menu/Menu.js
+++ b/src/components/menu/Menu.js
@@ -81,6 +81,8 @@ export class LeuMenu extends LeuElement {
_handleKeyDown(event) {
if (["ArrowDown", "ArrowUp", "Home", "End"].includes(event.key)) {
+ event.preventDefault()
+
const menuItems = this.getMenuItems()
let index = menuItems.findIndex((menuItem) => menuItem.tabIndex === 0)