How to listen to pointerUp event from a different mouse button when a mouse button is pressed down?
Im trying to listen to pointerUp event from right mouse button while the left mouse button is held down. For some reason when any mouse button is held down subsequent pointer down events from any other mouse buttons are not triggering pointerUp events, is there a workaround for this issue?
Thanks for the help in advance 🙂
2
Answers
You can do something like this
Read more here: mdn
Working sample: https://stackblitz.com/edit/vitejs-vite-rv2qvg?file=main.js&terminal=dev
You should consider disabling the context menu if you want consistent output, if that is applicable to you: