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

Click handler not being triggered on custom element #2624

Closed
1 of 3 tasks
ranile opened this issue Apr 19, 2022 · 0 comments · Fixed by #2627
Closed
1 of 3 tasks

Click handler not being triggered on custom element #2624

ranile opened this issue Apr 19, 2022 · 0 comments · Fixed by #2627
Assignees
Labels
A-yew Area: The main yew crate bug
Milestone

Comments

@ranile
Copy link
Member

ranile commented Apr 19, 2022

Problem
Click handler not being triggered on custom element, but works fine for standard elements.

Steps To Reproduce
Steps to reproduce the behavior:

  1. Clone /~https://github.com/hamza1311/yew/tree/yew-custom-element-bug-repro
  2. npm install
  3. trunk serve
  4. Click on "+1" button
  5. Notice the counter not increasing
  6. Comment out <mwc-button {onclick}>{ "+1" }</mwc-button> and uncomment // <button {onclick}>{ "+1" }</button>
  7. Click on "+1" button
  8. The counter increases

Expected behavior
The counter should increase with mwc-button, just as it does with button

Environment:

  • Yew version: git+/~https://github.com/yewstack/yew#59e2f827666b6eebdb52bed8d75abdc1529cc9b4 (lock file is in the repo)
  • Rust version: rustc 1.62.0-nightly (878c7833f 2022-04-16), `rustc 1.60.0 (7737e0b5c 2022-04-04)
  • Target, if relevant: wasm32-unknown-emscripten
  • Build tool, if relevant: trunk
  • OS, if relevant: Arch Linux
  • Browser and version, if relevant: Firefox 99.0.1

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
@ranile ranile added bug A-yew Area: The main yew crate labels Apr 19, 2022
@ranile ranile added this to the v0.20 milestone Apr 19, 2022
@WorldSEnder WorldSEnder self-assigned this Apr 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-yew Area: The main yew crate bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants