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
event listen fire multiple times #5221
Comments
What was the resolution? I am having this issue too. |
Are you on the latest release? |
Assuming the CDN link is the latest release I am yes. |
Also it happens 8 times consistently on my end. If I create the MDCSelect:change event myself and dispatch it then it only fires once, behaving normally. |
Here's a codepen where it seems to be behaving as expected: https://codepen.io/allanchenmdc/pen/MWKEqrK Please feel free to fork it to reproduce your issue. |
It's happering eigth times with me as well. $(document).ready(function () { This fire 8 alerts on screen. |
@luclorencini - I have modified this codepen to include a version of your code and it only seems to fire once. Please feel free to fork it to reproduce your issue: https://codepen.io/allanchenmdc/pen/MWKEqrK |
Is it possible we are doing something wrong which would produce this behavior in our local environments? I didn't reply anymore because I could not reproduce the issue in codepen. I fixed my local code with a "hack" to ignore the 7 erroneous event fires but that's not a fix it's just a bandaid. |
Hi @treminaor, From your previous comment it seems like you're using CDN for the latest version, and if that's confirmed we can rule out any MDC build problems or versioning issues (all components, esp In essence, we're trying to first get an equivalent environment to the codepen locally, then see what digressions we can see from there. CDN links reproduced for your ref: |
On the new version of MDCSelect is not possible to use anymore tag. Using I have to insert the onchange event on the listened of MDCSelect class. When registering the event handler the system fire many and many onchange event everytime I make a change. I've seen this multiple event firing on some other components too implementing the listening paradigm. Any possible solutions? Thank you.
The text was updated successfully, but these errors were encountered: