Bug Tracker

Opened 15 years ago

Closed 15 years ago

#2613 closed bug (fixed)

bind() breaks event.preventDefault()

Reported by: arrix Owned by:
Priority: major Milestone: 1.2.4
Component: event Version: 1.2.3
Keywords: Cc:
Blocked by: Blocking:

Description (last modified by arrix)

This is a really strange issue. Calling bind makes preventDefault ineffective in Firefox2. (Opera, Firefox3 and Safari3.1 are OK)

It has something to do with event.fix. I think it is a firefox2 bug rather than a jquery bug.

Attachments (1)

jquery_bind_breaks_preventDefault.html (733 bytes) - added by arrix 15 years ago.

Download all attachments as: .zip

Change History (4)

comment:1 Changed 15 years ago by arrix

I just played a bit more. Changing the order of the 2 event registration statements (bind and then addEventListener) fixes the problem in Firefox 2.

Changed 15 years ago by arrix

comment:2 Changed 15 years ago by arrix

Description: modified (diff)

comment:3 Changed 15 years ago by arrix

Resolution: fixed
Status: newclosed

This is no longer reproducible with the latest jquery which does not copy preventDefault/stopPropagation to the cloned event object anymore. It seems that we should try to avoid copying such native/special properties.

Note: See TracTickets for help on using tickets.