-
Notifications
You must be signed in to change notification settings - Fork 109
add support for UI events, including change #16
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
|
I know this is very old at this point, but thanks for contributing! Would you be able to add some unit tests for this change? |
|
Sure - basic unit test added to prove it fires, at least in my browser (Chrome 36.0.1985.143 m, Windows). As for other browsers, I am not sure. How do you do cross-browser testing? I see some possible jQuery TestSwarm integration, but I'm not sure. Though it seems to work for now, apparently Did you mean this pull request is old, or the project is old? |
|
I meant the pull request; Not your fault, mine. Thanks for adding the tests. I'll do some cross browser testing. |
|
When will this get merged in? Is it ready to go? Also, cancelable should be false, not true, as per the spec. |
|
@brian-mann Are you asking me or @mikesherov? From my end it worked in Chrome 28-36 when I made the PR, but wasn't tested across various browsers. Per my earlier comment, I still think it shouldn't be a UIEvent - I can try correct if there is interest. |
|
I'm asking @mikesherov since he said he was doing some cross browser testing. And yes, I believe the event should be HTMLEvents not UIEvent. This is a Dom Level 0 event. |
|
@brian-mann In order to correct cancelable and UIEvent->Event, I think this warrants some refactoring. |
|
@brian-mann I've just pushed some changes in c6a417d that address the above problems ( |
38a11d1 to
c737641
Compare
…factor handling for types
c737641 to
c6a417d
Compare
|
These changes look good, I've just been swamped with other work, and I missed the notifications earlier. Some of this is a bit over my head, can you give me a short explanation of what firing advantages fire HTMLEvents has over what simulate is currently capable of? |
|
@mikesherov There are different kinds of browser events with different APIs. Currently this library supports key ( See: |
|
Thank you for the contribution. As you've probably guessed already, this project isn't well maintained. I've added some details about that here: https://github.com/jquery/jquery-simulate#project-status |
Needed this to emulate native user-driven 'change' event on input elements, at least in Chrome 28, where jQuery's .change() and .trigger('change') failed me.