Problem
onclick handlers on button elements do not fire on Android (both emulator and a physical device), while identical code works correctly on desktop. No errors are logged anywhere — not in the Rust process, not in the Android WebView's JS console (confirmed via chrome://inspect/#devices remote DevTools inspection). Manually clicking the button from within DevTools' Elements panel also does not trigger the handler, ruling out a touch/gesture-specific cause.
Steps To Reproduce
- Scaffold a new Dioxus app with
dx new (mobile + desktop targets)
- Add a
button element at the top level of the root component's rsx! (not nested inside any match, if, or for), with an onclick handler that does something observable, e.g. onclick: move |_| println!("clicked")
- Run on desktop:
dx serve --platform desktop — click the button — the println! fires correctly
- Run on Android:
dx serve --platform android (tested against both an emulator and a physical Pixel device via --device <id>) — tap the button — nothing is printed, no errors anywhere
- Confirmed
oninput handlers on input elements do work correctly on Android (typed text updates a signal displayed elsewhere on screen), isolating the issue to click/button events specifically, not the event bridge as a whole
- Confirmed via
chrome://inspect/#devices that the button renders correctly in the DOM, and manually clicking it from DevTools also does not fire the handler, with no console errors
- Ruled out a
dx/dioxus version mismatch as the cause: initially had dioxus = "0.8.0-alpha.1" in Cargo.toml against dx CLI 0.7.10, which dx itself flagged as incompatible ("dx and dioxus versions are incompatible!"); pinning dioxus to 0.7.10 to match resolved the version-mismatch warning but did not resolve the button issue
Expected behavior
Tapping the button on Android should fire the onclick handler, the same as it does on desktop with identical code.
Screenshots
N/A
Environment:
Questionnaire
Problem
onclickhandlers onbuttonelements do not fire on Android (both emulator and a physical device), while identical code works correctly on desktop. No errors are logged anywhere — not in the Rust process, not in the Android WebView's JS console (confirmed viachrome://inspect/#devicesremote DevTools inspection). Manually clicking the button from within DevTools' Elements panel also does not trigger the handler, ruling out a touch/gesture-specific cause.Steps To Reproduce
dx new(mobile + desktop targets)buttonelement at the top level of the root component'srsx!(not nested inside anymatch,if, orfor), with anonclickhandler that does something observable, e.g.onclick: move |_| println!("clicked")dx serve --platform desktop— click the button — theprintln!fires correctlydx serve --platform android(tested against both an emulator and a physical Pixel device via--device <id>) — tap the button — nothing is printed, no errors anywhereoninputhandlers oninputelements do work correctly on Android (typed text updates a signal displayed elsewhere on screen), isolating the issue to click/button events specifically, not the event bridge as a wholechrome://inspect/#devicesthat the button renders correctly in the DOM, and manually clicking it from DevTools also does not fire the handler, with no console errorsdx/dioxusversion mismatch as the cause: initially haddioxus = "0.8.0-alpha.1"in Cargo.toml againstdxCLI 0.7.10, whichdxitself flagged as incompatible ("dx and dioxus versions are incompatible!"); pinningdioxusto0.7.10to match resolved the version-mismatch warning but did not resolve the button issueExpected behavior
Tapping the button on Android should fire the
onclickhandler, the same as it does on desktop with identical code.Screenshots
N/A
Environment:
Dioxus version: 0.7.10
Rust version: rustc 1.97.1 (8bab26f4f 2026-07-14)
OS info:
PRETTY_NAME="Zorin OS 17.3"
NAME="Zorin OS"
VERSION_ID="17"
VERSION="17.3"
VERSION_CODENAME=jammy
ID=zorin
ID_LIKE="ubuntu debian"
HOME_URL="https://zorin.com/os/"
SUPPORT_URL="https://help.zorin.com/"
BUG_REPORT_URL="https://zorin.com/os/feedback/"
PRIVACY_POLICY_URL="https://zorin.com/legal/privacy/"
UBUNTU_CODENAME=jammy
App platform: Android (emulator and physical Pixel device, both via
dx serve --platform android)Questionnaire