In my scenario, I have an HTML canvas positioned above various other HTML elements that detect right-click mouse events. The goal is to be able to draw on the canvas with the left mouse button while simultaneously interacting with the underlying HTML elements using the right mouse button.
I understand that setting the CSS property "pointer-events" to "none" allows all mouse events to pass through the canvas. However, I specifically want only right-click events to pass through.
One possible solution could involve listening for right-click events on the canvas, then in the callback, setting "pointer-events" to "none", manually triggering a right-click event, and then reverting "pointer-events" back to "auto".
For context, I'm utilizing KineticJS, and I am unsure of how to manually trigger mouse events using this library.
If anyone has any suggestions or insights on accomplishing this task, they would be greatly appreciated.