Skip to content
This repository was archived by the owner on Dec 17, 2025. It is now read-only.

Commit e072d14

Browse files
authored
Stop propagation of combobox keyboard events (#931)
Stop propagation of combobox keyboard events This commit adds a missing `stopPropagation` call in the combobox's keyboard event handling in order to prevent those events from bubbling to other elements.
1 parent 3991920 commit e072d14

File tree

1 file changed

+3
-0
lines changed
  • headless/src/jsMain/kotlin/dev/fritz2/headless/components

1 file changed

+3
-0
lines changed

headless/src/jsMain/kotlin/dev/fritz2/headless/components/Combobox.kt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -569,6 +569,9 @@ class Combobox<E : HTMLElement, T>(tag: Tag<E>, id: String?) : Tag<E> by tag, Op
569569
keydownsIf {
570570
if (shortcutOf(this) in (itemActivationKeys + Keys.Enter)) {
571571
preventDefault()
572+
// Using stopImmediatePropagation() would prevent the event from being handled in all
573+
// relevant places
574+
stopPropagation()
572575
true
573576
} else false
574577
}.map { event ->

0 commit comments

Comments
 (0)