Bug Tracker

Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#1217 closed bug (fixed)

Firefox complains about event.which not being writable (keyboard event handling)

Reported by: mpenet Owned by:
Priority: major Milestone: 1.1.3
Component: event Version: 1.1.2
Keywords: Cc:
Blocked by: Blocking:

Description

You can reproduce it on firebug with this: $(document).keypress( function() { alert("broken"); } );

Tested on FF 2.0.0.3 / OSX

Change History (4)

comment:1 Changed 13 years ago by john

Resolution: duplicate
Status: newclosed

Duplicate of #1216.

comment:2 Changed 13 years ago by bruno1378

Resolution: duplicate
Status: closedreopened

I am also getting this error. here's the error and the error line.

setting a property that has only a getter [Break on this error] event.which = event.keyCode; jquery.js (line 2976)

I'm seeing this error while using ExtJS and their custom combo box.

comment:3 Changed 13 years ago by jack.slocum

I can confirm this issue. On any key event, jQuery is setting the property "event.which " on this line:

Add which for keypresses: keyCode

2975 if ( (event.which == null
event.type == "keypress") && event.keyCode != null )

2976 event.which = event.keyCode; <-- here

Which FireFox doesn't seem to like very much.

comment:4 Changed 13 years ago by brandon

Resolution: fixed
Status: reopenedclosed

This is now fixed in Rev [2009]

Note: See TracTickets for help on using tickets.