Mouse events are always attached to window

Hey guys!
The problem here is in Mouse initialization. The attach method intended to attach events to elements actually attach them to window. Only contextmenu event is attached to desired element.

This should only capture events from myElement:

const mouse = new Mouse(myElement);

But actually it captures all window events.

I created pull request here:

Allready discussed here:

Iā€™m closing the PR

1 Like