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
Change events are not propagated to addEventListener #2
Comments
Bug confirmed. Temporary workaround is to attach the listeners through jQuery methods I'll take a look why this isn't interoperating with the native listeners later this week. And here's the fiddle. |
It's because the jQuery method for firing a method just iterates through the listener's jQuery has kept track of. To simulate a real event you need to do something like https://github.com/FGRibreau/jQuery-plugin-fireEvent |
I see. I'm aware that the I'll try the linked plugin out and check how cross-browser it is, before porting it to this plugin. I have some close work deadlines atm so it might have to wait a bit. |
No problem, I'm currently working around the issue by replacing the two trigger methods with calls to that plugin. |
Yup, the plugin works nicely on Chrome -> fiddle. Some more testing and should be able to commit it. |
Optimized the code keeping only the necessary part and namespaced it, also replaced the |
Final revision for now: http://jsfiddle.net/zbp8r/17/ |
The issue here is that jQuery UI button widget uses Firing synthetic events will have more issues, such as the Fixing the actual button widget source might be easier and more useful for everyone. My small repo was mostly a temporary fix for #7665, which was introduced as a fix to #6970. I may work on these issues and find a better way around, deprecating this repo by then. |
While working on #7665 to make an official jQuery UI fix for the issue, @mikesherov commented on the ticket #7665:
In case my PRs get rejected, I'll branch UltButtons to version 2.0 which will not have support for native listeners either. Sorry but this issue is a little out of this plugin's scope, therefore you can either try adapting your page's code to attach the handlers with jQuery or use the code in the fiddle above if you're not worried about IE not bubbling up the native change event. |
Boo. Oh all right, I guess I'll keep using my hack then.... |
Thank you! This totally helped the UEX in my site. Waiting for jquery to fix it natively, but great temporary fix, works much better. |
@pixelwiz No problem. |
jQuery should interoperate with other calls to addEventListener. However, UltButtons fails to propagate change events in this case. Here is an example application which has this problem: http://web.mit.edu/~ezyang/Public/ult/ult.html
To see the problem, open up a JS console and click on the buttons. You should see console messages for each click. Now, trigger the jQuery drag bug (click, drag by a few pixels, and release). You should see the appropriate button depress, but you will not see a console message (you may need to try a few times).
The text was updated successfully, but these errors were encountered: