Skip to content

Event: Remove fake originalEvent from jQuery.Event.simulate #2303

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

gabrielschulhof
Copy link

Fixes gh-2300

expect( 1 );

var done = assert.async(),
input = jQuery( "<input>" ).appendTo( "#form" );
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's self-close the input for that XHTML support that we keep telling ourselves will be verified someday.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed for sanitation and sanity reasons, although this goes through the rsingleTag path anyway.

Gabriel Schulhof added 3 commits May 14, 2015 00:53
Make sure preventing default on focusin thows no exception

Make sure simulated event has no originalEvent

Add test for jQuery.event.simulate() originally written by Dave Methvin at
https://jsfiddle.net/74eutos8/embedded/result/
@gabrielschulhof gabrielschulhof force-pushed the 2300-empty-originalEvent-gone branch from 2826dfc to 74e0e29 Compare May 13, 2015 22:32
@gabrielschulhof
Copy link
Author

@arschmitz @timmywil the event-related breakage in the mobile tests ensues from the fact that we

// mock originalEvent
$.Event.prototype.originalEvent = {
  touches: [ { pageX: 0, pageY: 0 } ]
};

... and stuff like that. If we mock originalEvent, it is our responsibility to mock it correctly.

@markelog markelog closed this in 7475d5d May 29, 2015
markelog pushed a commit that referenced this pull request Nov 10, 2015
@lock lock bot locked as resolved and limited conversation to collaborators Jan 19, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Events: originalEvent must not be an empty object
7 participants