No public way to dispatch a DOM event (e.g. a synthetic keydown) through DioxusDocument
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 35/100
Research direction
Start by tracing DioxusDocument and its event driver, then read synthetic_click_event, synthetic_form_event, BlitzKeyboardData, and DioxusEventHandler to understand the existing paths. Compare the proposed public dispatch API with delivering keyboard UiEvents to the focused node; done means app handlers and Blitz default actions both receive the synthetic event.
Written by the indexing model from the issue text.
Description
There's no public way to send a DOM event through a DioxusDocument's event driver, so that both the app's Dioxus handlers and Blitz's default actions run. An example is a key press from an app's own input layer, such as gamepad navigation or an on-screen keyboard. synthetic_click_event and synthetic_form_event build Dioxus event payloads, but nothing builds keyboard ones (BlitzKeyboardData is pub(crate)). The handler that bridges the driver to the VirtualDom (DioxusEventHandler) isn't exported. Document::handle_ui_event only takes UiEvents from the shell, which go through hit testing.
An app that moves focus itself, with a gamepad say, can't make the focused control receive the keydown a real key would send. So every control needs a second, non-DOM path for the same action.
Possible shape: a public DioxusDocument::dispatch_event(target: NodeId, data: DomEventData) that runs the event driver, or keyboard UiEvents delivered to the focused node as they are now, plus a public constructor for them.
- Dominant language
- Rust
- Stars
- 4.5k
- Forks
- 281
- Avg merge
- 6h 6m
- Merged PRs (30d)
- 184
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from DioxusLabs/blitz
-
<input type="number"> misses text-entry leaf sizing in layoutPossibly taken @GoCoder7 claimed this today. Open
Difficulty 1/5 Under an hour Newbie friendliness 88/100
DioxusLabs/blitz#1675 ·
Maintainers usually reply within 1 day
-
Copy, cut and paste shortcuts don't work with Caps Lock or ShiftPossibly taken @nicoburns claimed this 8 days ago. OpenA-Events C-Bug
Difficulty 1/5 1-3 hours Newbie friendliness 86/100
DioxusLabs/blitz#1507 ·
Maintainers usually reply within 1 day
-
Copy and cut work in password inputsPossibly taken @nicoburns claimed this 8 days ago. OpenA-Events A-Forms C-Bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
DioxusLabs/blitz#1501 ·
Maintainers usually reply within 1 day
-
Panic on live viewport resize when unstyled elements exist in display: none subtreePossibly taken @GoCoder7 claimed this 9 days ago. OpenA-Layout A-Style C-Bug I-Crash
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
DioxusLabs/blitz#1488 ·
Maintainers usually reply within 1 day
-
Right-button drag starts a text-selection drag and suppresses `contextmenu`Possibly taken @staging-devin-ai-integration claimed this 24 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 79/100
DioxusLabs/blitz#1184 ·
Maintainers usually reply within 1 day
All issues in DioxusLabs/blitz
Similar issues
-
macos parity priority: low ui
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
storytold/vectorcraft#8766 · 1 comment ·
Maintainers usually reply within 1 day
-
`sha256()` returns a wrong hash when libsql-ffi is built with gcc 11 or laterPossibly taken @colinhacks claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
tursodatabase/libsql#2333 ·
Maintainers usually reply within 11 days
-
area:plugins kind:perf priority:p3 ready
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
Maintainers usually reply within 1 day
-
needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
pbakaus/impeccable#1601 ·
Maintainers usually reply within 1 day