Native shift + right click on non-canvas makes shift stuck for the viewer
Describe the bug When you right-click outside of the canvas with xeokit while pressing the shift, the browser context menu will open. Once you're going back into the canvas, all controls will behave like shift is still pressed, even though you let go of it while pressing the context menu.
Fix: In the following code, keyboard button status is only updated if keyup is fired. keyup never fires, if the users hits shift and then opens the context menu via right click (then the contextmenu event fires).
https://github.com/xeokit/xeokit-sdk/blob/e9c8daf6ebcecfdbaf9027beea2810fe6e102f22/src/viewer/scene/input/Input.js#L1067-L1082
To Reproduce
- Go to https://jsfiddle.net/o6Lzvu58/2/
- Click on shift + right click in the right area to open the context menu
- Let go of shift
- Close the context menu
- Now the viewer still behaves like shift is pressed
- Once you hit shift again on your keyboard everything will work again
https://github.com/user-attachments/assets/253b9826-c830-4082-8eb3-13da7dc396db
Desktop (please complete the following information):
- MacOS
- Chrome