DioxusLabs / DioxusLabs/dioxus
form buttons in desktop still navigate, causing a blank/bricked page
- Dominant language
- Rust
- Stars
- 39.1k
- Forks
- 1.9k
- Avg merge
- 4d 10h
- Merged PRs (30d)
- 4
Description
When clicking on a button, even without an `onclick` handler, the window goes blank and the console shows:
```
[Error] Unhandled Promise Rejection: TypeError: undefined is not an object (evaluating 'this.templates[this.u16buf[this.u16bufp++]][this.u16buf[this.u16bufp++]]')
run (index.html:192:411)
run_from_bytes (index.html:233)
rafEdits (index.html:238:11691)
(anonymous function) (index.html:238:11971)
```
The following code reproduces the behaviour for me. It appears the button being in a `form` is what causes the bug.
```rust
use dioxus::prelude::*;
fn main() {
dioxus::launch(App);
}
#[component]
fn App() -> Element {
rsx! {
form {
button {
"Button"
}
}
}
}
```
**Expected behavior**
No error happens and the `onclick` callback is called.

**Environment:**
- Dioxus version: 0.6.3 (CLI and library)
- Rust version: 1.87.0
- OS info: Arch Linux (webkit2gtk-4.1 version 2.48.2-1 is installed)
- App platform: Desktop
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.