Replies: 1 comment
-
The only concern I have with switching to non-delegated version is losing the performance benefits they provide. Perhaps, providing a way to switch between them might be a better idea. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Description
SolidJS uses event delegation for the following events:
https://docs.solidjs.com/concepts/components/event-handlers#list-of-delegated-events
For instance, using the property
onClick
will register a delegated event handler, while theon:click
property will register a native event listener.ArkUI attaches its own event listeners using the delegated syntax, which in some cases, like in the
Tooltip
focus handlers, or in theSelect
outside click handler, breaks functionality when it's used inside a shadow root.This can be somewhat mitigated by fixing the events on runtime if using
asChild
, using the following approach:This however does not work on custom events like
Select
'sonInteractOutside
.Link to Reproduction (or Detailed Explanation)
https://stackblitz.com/~/github.com/ivancuric/solidjs-templates-yge8guon?file=src/App.tsx
Steps to Reproduce
Ark UI Version
5.0.0
Framework
Browser
Chrome
Additional Information
related issue: #3146
Beta Was this translation helpful? Give feedback.
All reactions