Bug Tracker

Ticket #2613 (closed bug: fixed)

Opened 8 months ago

Last modified 7 months ago

bind() breaks event.preventDefault()

Reported by: arrix Assigned to: anonymous
Type: bug Priority: major
Milestone: 1.2.4 Component: event
Version: 1.2.3 Keywords:
Cc: Needs: Review

Description (last modified by arrix) (diff)

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

jquery_bind_breaks_preventDefault.html (0.7 kB) - added by arrix 8 months ago.

Change History

Changed 8 months 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 8 months ago by arrix

Changed 8 months ago by arrix

  • description changed from This is a really strange issue. Calling bind makes preventDefault ineffective in Firefox2 and Opera (Firefox3 and Safari3.1 are OK) It has something to do with event.fix. Is this a jQuery bug or a browser bug? to 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.

Changed 7 months ago by arrix

  • status changed from new to closed
  • resolution set to fixed

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.