Side navigation
#11028 closed bug (invalid)
Opened December 15, 2011 12:59AM UTC
Closed December 16, 2011 04:43PM UTC
$.event.handle stopped working on jQuery 1.7.x
Reported by: | pedrolamas@gmail.com | Owned by: | pedrolamas@gmail.com |
---|---|---|---|
Priority: | undecided | Milestone: | None |
Component: | unfiled | Version: | 1.7.1 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
Greetings,
I have a jQuery plugin, Lightbox from Balupton, that is being used by many Wordpress users (and I really mean MANY USERS!!!)
It worker fine with jQuery 1.6.4, but since 1.7 it stopped working correctly...
I managed to narrow the issue to the usage of $.event.handle.apply that seems to do nothing!
I've set two samples online for you to check it out here (with jQuery 1.6.4 and 1.7.1):
http://dl.dropbox.com/u/28356/jquerybug/index.htm
Can you help me with this please?
Best regards,
Pedro Lamas
Attachments (0)
Change History (6)
Changed December 15, 2011 01:53AM UTC by comment:1
resolution: | → invalid |
---|---|
status: | new → closed |
Changed December 15, 2011 12:06PM UTC by comment:2
There is something I think skipped you: I think Balupton stopped developing this plugin so currently, I'M THE DEVELOPER!
I've maintained the plugin on a personal forked GitHub branch from the main one, and so far I managed to get it working quite well, but then came jQuery 1.7.X and all hell broke loose... :(
Changed December 15, 2011 07:19PM UTC by comment:3
resolution: | invalid |
---|---|
status: | closed → reopened |
Changed December 15, 2011 07:28PM UTC by comment:4
owner: | → pedrolamas@gmail.com |
---|---|
status: | reopened → pending |
It wasn't clear from the description that you were the developer.
I took a quick look, and the thing I see that is immediately wrong is that you are trying to hold onto the event object after the event has been fired and use it on a timeout. The consequences of doing that are undefined. In IE<9 specifically, the native window.event object is invalid once the event handler has returned for example.
The plugin is much too big to debug, and I am not sure what I am supposed to be seeing. All I know is that you have said it "stopped working correctly".
Can you provide a reduced test case? Just strip out all the unused code in your plugin so it is possible to see what code is involved.
Changed December 15, 2011 11:45PM UTC by comment:5
status: | pending → new |
---|
First of all, thank you for your help! :)
Well, you nailed what it's being done there, and I found how to fix (though it's not really a good fix):
On line 642 of the plugin js file I have this:
event.type = 'lastclick'; $.event.handle.apply(Me, [event,clicks])
I just changed those two to this:
event.type = 'lastclick'; event.isPropagationStopped = function() { return false }; $.event.handle.apply(Me, [event,clicks])
So, I just reseted the isPropagationStopped and sudently it started working fine! :)
I guess the change from jQuery 1.7 to the previous versions has something to do with the event propagation, but I really don't know what it is!
Right now the plugin is working again, and the users seems to confirm it! :)
Changed December 16, 2011 04:43PM UTC by comment:6
resolution: | → invalid |
---|---|
status: | new → closed |
You would need to contact the author of the plugin. The address in the plugin seems to be dead, http://www.balupton.com/projects/jquery-lightbox, but Google says this is the place to go.
http://getsatisfaction.com/balupton/products/balupton_jquery_lightbox