Skip to content

Commit

Permalink
chore: Fix TS issue on mouse event creation (#306)
Browse files Browse the repository at this point in the history
  • Loading branch information
wilsonge authored and RomanHotsiy committed Jul 18, 2017
1 parent 039bbdb commit 6bb3bd8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tests/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@ export function mouseclick( element ) {
// create a mouse click event
var dispatchedEvent
try {
dispatchedEvent = new MouseEvent('click', true);
dispatchedEvent = new MouseEvent('click', {
bubbles: true,
cancelable: false
});
} catch (e) {
dispatchedEvent = document.createEvent('MouseEvent');
dispatchedEvent.initEvent('click', true, false);
Expand Down

0 comments on commit 6bb3bd8

Please sign in to comment.