diff --git a/package.json b/package.json index ebf5f4a..b75a340 100644 --- a/package.json +++ b/package.json @@ -3,6 +3,6 @@ "browser": "src/BetterSelect.js", "type": "module", "license": "MIT", - "version": "1.2.1", + "version": "1.2.2", "url": "https://darkwiiplayer.github.io/BetterSelect/" } diff --git a/src/BetterSelect.js b/src/BetterSelect.js index 6400c85..9dbec02 100644 --- a/src/BetterSelect.js +++ b/src/BetterSelect.js @@ -191,7 +191,7 @@ export class BetterSelect extends HTMLElement { }) this.addEventListener("keydown", event => { - if (event.key == " " && !this.input.contains(this.shadowRoot.activeElement)) { + if (event.key == " " && this.list.contains(this.shadowRoot.activeElement)) { if (this.#internals.states.has("--open")) { this.close() } else {