Open
Description
Demo: https://output.jsbin.com/vilumo
let element = document.createElement('input');
['mousedown', 'mouseup', 'click', 'focus', 'focusin'].forEach(type => {
element.addEventListener(type, () => {
console.log('event:', type);
});
});
document.body.appendChild(element);
Tested on MS Edge, FireFox, Chrome, and Safari the output is:
event: mousedown
event: focus
event: focusin
event: mouseup
event: click
However, our utility function fires them as mousedown, focusin, focus, mouseup, click
. I noticed this while migrating the implementation to @ember/test-helpers
and writing unit tests for the behavior of click
.
Metadata
Metadata
Assignees
Labels
No labels