Skip to content

label not triggering form control elements events #471

Description

@Klemen2

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

<label onclick="console.log('label 1')">Label 1<input onclick="console.log('input 1')"></label>
<label for="input" onclick="console.log('label 2')">Label 2</label><input id="input" onclick="console.log('input 2')">
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");}
      }
  }

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions