Modify

Opened 9 years ago

Closed 5 years ago

Last modified 5 years ago

#3229 closed bug (fixed)

Safari: jQuery.simulate() doesn't set "which" field for key events

Reported by: anonymous Owned by: rdworth
Priority: major Milestone: 1.8.18
Component: [meta] ui.test Version: 1.5.1
Keywords: Safari, simulate, keystroke Cc:
Blocked by: Blocking:

Description

In Safari:

When jQuery.simulate() calls document.createEvent("KeyEvents"), it fails. It falls through to the catch clause, which tries document.createEvent("Events"), which succeeds, but the key event that results doesn't have its "which" field set.

Change History (6)

comment:1 Changed 9 years ago by paul

  • Owner changed from paul to rdworth
  • Status changed from new to assigned

comment:2 Changed 8 years ago by rdworth

  • Component changed from ui.core to [internal] ui.test

comment:3 Changed 5 years ago by scottgonzalez

  • Milestone changed from TBD to 1.9

comment:4 Changed 5 years ago by Richard D. Worth

  • Resolution set to fixed
  • Status changed from assigned to closed

Simulate: fixed charCode to be undefined unless specified. Fixed #3229 - Safari: jQuery.simulate() doesn't set "which" field for key events

Changeset: b90d83c6c4e3f5e328d5557aa35ce9fbded6fd0f

comment:5 Changed 5 years ago by Richard D. Worth

Simulate: fixed charCode to be undefined unless specified. Fixed #3229 - Safari: jQuery.simulate() doesn't set "which" field for key events (cherry picked from commit b90d83c6c4e3f5e328d5557aa35ce9fbded6fd0f)

Changeset: 2e1da90608e0d442f1e03508e65875c6949bc250

comment:6 Changed 5 years ago by scottgonzalez

  • Milestone changed from 1.9 to 1.8.18

Please use jsFiddle or jsbin to provide test cases instead of pasting large blocks of code in the ticket.

If you have a fix, fork the repository on GitHub and send a pull request. Make sure to check out the guide for writing code for jQuery projects.

Modify Ticket

Change Properties
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.