Skip to content

Fix autofill event downcast - ignore events of the wrong type#5379

Merged
jkelleyrtp merged 15 commits intoDioxusLabs:mainfrom
ealmloff:fix-autocomplete
Apr 7, 2026
Merged

Fix autofill event downcast - ignore events of the wrong type#5379
jkelleyrtp merged 15 commits intoDioxusLabs:mainfrom
ealmloff:fix-autocomplete

Conversation

@ealmloff
Copy link
Copy Markdown
Member

@ealmloff ealmloff commented Mar 16, 2026

autofill events don't show up as the right type of event. this pr adds checks for event types and ignores events we don't recognize instead of panicing

It also introduces a unified source for events and event types which deduplicates some code

Fixes #4079
Fixes #5375

@ealmloff ealmloff added bug Something isn't working web relating to the web renderer for dioxus desktop Suggestions related to the desktop renderer labels Mar 16, 2026
@ealmloff ealmloff removed the desktop Suggestions related to the desktop renderer label Mar 23, 2026
@ealmloff ealmloff changed the title Fix autofill event downcast Fix autofill event downcast - ignore events of the wrong type Mar 24, 2026
@ealmloff ealmloff marked this pull request as ready for review March 24, 2026 20:52
@ealmloff ealmloff requested a review from a team as a code owner March 24, 2026 20:52
@jkelleyrtp jkelleyrtp merged commit d8026f8 into DioxusLabs:main Apr 7, 2026
35 checks passed
@jkelleyrtp
Copy link
Copy Markdown
Member

jkelleyrtp commented Apr 7, 2026

I will say, glad this fixes the bug, but I don't think the code for the html module really got any cleaner. I think we should look into using proper Rust codegen (build.rs -> html.rs) in a way that's easy to expand for other element systems like TUI / uikit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working web relating to the web renderer for dioxus

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BorrowMutError with 'onkeydown' listener Cannot read properties of undefined (reading 'length') error on Chrome mobile after autocomplete

2 participants