label not triggering form control elements events
- Dominant language
- Rust
- Stars
- 4.1k
- Forks
- 203
- Avg merge
- 8h 58m
- Merged PRs (30d)
- 112
Description
In html, some events on form control elements can be triggered by interacting with the label itself, while in blitz they do not trigger them.
### Examples
```html
Label 1
Label 2
```
```rust
rsx! {
label {
onclick: move |_| {dbg!("label 1");},
"Label 1",
input {
onclick: move |_| {dbg!("input 1");}
}
}
label {
for: "input",
onclick: move |_| {dbg!("label 2");},
"Label 2"
}
input {
id: "input",
onclick: move |_| {dbg!("input 2");}
}
}
```
Contributor guide
Research direction
Start with the HTML and RSX reproductions in the issue, then trace Blitz's event dispatch for label elements and associated or nested form controls. Verify both examples, including click handlers on the label and input, and consider the work done when their behavior matches the browser examples.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- html, rust
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100