Open chenzn1 opened 1 year ago
That would be a very specific and arbitrary solution for the render
function, and not flexible across multiple render() calls.
The concept of delegation should be totally decoupled from exactly which element we render to. We might like delegation to be on any arbitrary node besides the one we render to.
I also mentioned in
that not delegating by default would be great.
Event delegation is important for portals and pre-emptive hydration techniques. I think it might be possible for Portals to have a different delegation approach(I believe React did something like this for React 17) but this is definitely something that is involved. Especially considering multiple/render hydration entries in things like Islands.
Background
https://github.com/solidjs/solid/issues/1786
event. stopPropagation
is not work as expected.Solution
Change the
render
anddelegateEvents
indom-expressions/src/client.js
Code location