marc2332 / freya

Cross-platform GUI library for 🦀 Rust powered by 🧬 Dioxus and 🎨 Skia.
https://freyaui.dev/
MIT License
1.52k stars 63 forks source link

bug: Queued events could be wrongly emitted to Elements whose ElementId (VirtualDOM ID) have been reused #608

Closed marc2332 closed 5 months ago

marc2332 commented 6 months ago

This is a very weird edge case that makes the VirtualDOM fire events on Elements that have been removed and whose ElementId have been reused.

I simply need to retrieve the ElementId just before calling vdom.handle_event instead of getting it in events_measurer.

marc2332 commented 6 months ago

This will mostly occur with keydown events, which will be queued in most cases and not bubble up, leading to the problem described above.