Skip to content

Commit acc8697

Browse files
committed
specify clientX and clientY when simulating mouse events
1 parent dca7314 commit acc8697

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

test/jasmine/assets/mouse_event.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
1-
module.exports = function(type, x, y, opts) {
1+
module.exports = function(type, x, y) {
2+
var options = {
3+
bubbles: true,
4+
clientX: x,
5+
clientY: y
6+
};
7+
28
var el = document.elementFromPoint(x,y);
3-
var options = opts || { bubbles: true };
49
var ev = new window.MouseEvent(type, options);
510
el.dispatchEvent(ev);
611
};

0 commit comments

Comments
 (0)