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

Commit 3991920

Browse files
authored
Revert "Fixes a small potential bug on headless switch component (#933)" (#935)
This reverts commit b20fd4d.
1 parent b20fd4d commit 3991920

File tree

1 file changed

+1
-4
lines changed
  • headless/src/jsMain/kotlin/dev/fritz2/headless/components

1 file changed

+1
-4
lines changed

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

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,7 @@ abstract class AbstractSwitch<C : HTMLElement>(
3535
attr(Aria.checked, enabled.asString())
3636
attr(Aria.invalid, "true".whenever(value.hasError))
3737
attr("tabindex", "0")
38-
value.handler?.invoke(this, clicks {
39-
stopImmediatePropagation()
40-
preventDefault()
41-
}.map { !value.data.first() })
38+
value.handler?.invoke(this, clicks.map { !value.data.first() })
4239
value.handler?.invoke(
4340
this,
4441
keydownsIf {

0 commit comments

Comments
 (0)