html canvas trap left click and allow right click to pass through (pointer-events)
问题 The use case is that I have an html canvas on top of several html elements which listen for right click mouse events. I want to draw on the canvas using left mouse button, and at the same time interact with underlying html elements using right click. I get that I can allow all mouse events to pass through the canvas by setting css property pointer-events to none. However I want to allow only right click to pass through it. One way to achieve this may be to listen on the canvas for right click