-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Repairs event handling with focus of manipulation and filtering
- enables filtering and manipulating events immediately after occurrence due to specialized event factories. Prevent `Flow` based delay we had until now. - simplifies `Listener`-type. It remains more or less as a marker type, in order to dispatch the convenience functions to grab values out of specific DOM elements. - get rid of unnecessary convenience functions - remove `@ignore` from one test case as the cause is now fixed - add a new dedicated documentation chapter for event handling including `Key`-API
- Loading branch information
christian.hausknecht
committed
May 2, 2024
1 parent
b91675e
commit 0b78b92
Showing
15 changed files
with
4,176 additions
and
477 deletions.
There are no files selected for viewing
3,902 changes: 3,580 additions & 322 deletions
3,902
core/src/jsMain/kotlin/dev/fritz2/core/events.kt
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -71,7 +71,7 @@ class Menu<C : HTMLElement>(tag: Tag<C>, id: String?) : Tag<C> by tag, OpenClose | |
if (!openState.isSet) openState(storeOf(false)) | ||
content() | ||
attr(Aria.expanded, opened.asString()) | ||
activations.preventDefault().stopPropagation() handledBy toggle | ||
activations { preventDefault(); stopPropagation() } handledBy toggle | ||
}.also { button = it } | ||
} | ||
|
||
|
@@ -101,7 +101,7 @@ class Menu<C : HTMLElement>(tag: Tag<C>, id: String?) : Tag<C> by tag, OpenClose | |
"$componentId-items", | ||
scope, | ||
[email protected], | ||
reference = button ?: button { }, | ||
reference = button ?: button { }, | ||
ariaHasPopup = Aria.HasPopup.menu | ||
) { | ||
|
||
|
Oops, something went wrong.