I am working on Easel JS and came across one issue. If I am adding Events to one easelJs element then how can I ignore the right-click and only listen to left-click?
Click should work on a primary key but it is also working for other keys also. I have come across one scenario where pressUp of left-clicking is getting missed and that is creating an issue. steps are as follows:
- left mouseDown on the object.
- right mouseDown on the same object.
- right pressUp on the object.
If we follow this order, left pressUp is getting missed it is not getting fired nor it is present after that point. It's like it totally vanishes as if it never existed.
Can anyone please help me with this? Thank you in advance!!
I am kind confused with your question, but I think a easy way to ignore the right click event is to use
event.preventDefaultforcontextmenu.For example (you may not able to show the right click menu in the example):