V4 without jquery: fix tests#23981
Conversation
| var evt = new CustomEvent('click', { | ||
| bubbles: true, | ||
| cancelable: true | ||
| }) |
There was a problem hiding this comment.
that's why previously I asked you to use EventHandler in our unit test 😉 which correct the buggy preventDefault from IE, can you give it a try please ?
There was a problem hiding this comment.
I've tried to use EventHandler.trigger instead of creating a CustomEvent object, but preventDefault produces the same buggy result. Trying to replace the preventDefault in an HTMLEvents object works on IE, but breaks in phantom. This is the only working solution for all the browsers.
There was a problem hiding this comment.
that's weird I didn't see that issue in our other plugins without jQuery
There was a problem hiding this comment.
I think this is the only test for the defaultPrevented property for a non-jQuery event by now. In other tests trigger is used to emit the event (which works correctly), but the Event object is discarded and never checked.
|
@Johann-S Now Edge is broken.. workin' on it. |
Related to #23586 (comment)
There were a couple of buggy tests for IE 11:
clickon an element not added to the DOM does not produce any effectdefaultPreventeddoes not work for code-generated events