Bug Tracker

Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#13425 closed bug (notabug)

event.preventDefault not working in Firefox

Reported by: Jonathan Owned by:
Priority: undecided Milestone: None
Component: unfiled Version: 1.9.1
Keywords: Cc:
Blocked by: Blocking:

Description

If you load http://jsfiddle.net/yramagicman/smShV/ in Firefox, you'll see the bug. The link functions even though I've told it not to via even.preventDefault(). This only happens in Firefox (v18.0.2). Current Webkit browsers and Opera are fine. I don't have proper access to IE because I'm on a Mac, but what I have (cloud IE 9 through Chrome) returns the same result. Firebug returns "even not defined" and jQuery 1.9.1 line numbers 3074 and 2750. The bug exists both in 1.9.1 and the 2.0b1 available on jsfiddle.

Side note:

return: false;

also does not prevent the Firefox from following the link and loading the page. I have no extensions loaded (except firebug) and my preferences are all essentially the defaults.

Change History (2)

comment:1 Changed 7 years ago by dmethvin

Resolution: notabug
Status: newclosed

I don't think there's a standard behavior for what to do when there is a JavaScript error in an event handler. If you declare the event arg it works consistently. http://jsfiddle.net/smShV/1/

comment:2 in reply to:  1 Changed 7 years ago by anonymous

Replying to dmethvin:

I don't think there's a standard behavior for what to do when there is a JavaScript error in an event handler. If you declare the event arg it works consistently. http://jsfiddle.net/smShV/1/

ah. Thanks!

Note: See TracTickets for help on using tickets.