mirror of
https://github.com/hodgef/simple-keyboard.git
synced 2025-01-19 16:52:59 +08:00
- changes mousedown event simulation so that event
object is passed
to `onmousedown` handler
This commit is contained in:
parent
0052efa582
commit
1aedf9c487
@ -863,7 +863,9 @@ it('Keyboard handleButtonMouseDown will work', () => {
|
|||||||
target: keyboard.getButtonElement("q")
|
target: keyboard.getButtonElement("q")
|
||||||
});
|
});
|
||||||
|
|
||||||
keyboard.getButtonElement("q").onmousedown();
|
var clickEvent = document.createEvent('MouseEvents');
|
||||||
|
clickEvent.initEvent('mousedown', true, true);
|
||||||
|
keyboard.getButtonElement("q").dispatchEvent(clickEvent);
|
||||||
document.onmouseup();
|
document.onmouseup();
|
||||||
|
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user