Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some Events do not fire on input elements #3792

Open
1 of 3 tasks
DaneSlattery opened this issue Jan 14, 2025 · 0 comments
Open
1 of 3 tasks

Some Events do not fire on input elements #3792

DaneSlattery opened this issue Jan 14, 2025 · 0 comments
Labels

Comments

@DaneSlattery
Copy link

Problem
I have attached event listeners to input events hoping to catch when the input is invalid. I show in this example that the console does not log when the element becomes invalid:

Playground
Steps To Reproduce
Steps to reproduce the behavior:

  1. Go to https://play.yew.rs/?shared=fylZB97pMH8uqPFARRH1
  2. Open the console.
  3. Enter text with a length less than 2 and remove focus
  4. See that the onchange writes a log, while the on-invalid does not.

Expected behavior
I expect that when the component becomes invalid, the oninvalid event calls my callback. The same seems to be true for some other events, but I'm not sure if those are down to ignorance on my part.

Environment:

  • Yew version: 0.21 ( on yew playground)
  • Rust version: same as yew playground? Latest
  • Browser and version, if relevant: Chrome

Questionnaire

  • I'm interested in fixing this myself but don't know where to start
  • I would like to fix and I have a solution
  • I don't have time to fix this right now, but maybe later
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant