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: