KittyCAD / modeling-app

The KittyCAD modeling app.
https://kittycad.io/modeling-app/download
MIT License
283 stars 20 forks source link

[BUG]: context menu pops up during pan operation when using app.zoo.dev in Firefox #2453

Open yeroca opened 1 month ago

yeroca commented 1 month ago

Describe the bug

One of the panning methods is Shift+Right click+mouse move.

On Firefox, when I do this, the context menu pops up and tends to obscure a part of the screen.

Steps to Reproduce

Use firefox to open app.zoo.dev and log in.

Shift+Right Click+ mouse move ... context menu appears

Expected Behavior

I expect that the context menu is disabled when Shift+Right click. I don't know if it's possible in Firefox to do this, however.

Screenshots and Recordings

No response

Desktop OS

Fedora Linux

Browser

Firefox 126.0

Version

0.21.6

Additional Context

Low priority, I reckon.

franknoirot commented 1 month ago

Searching around the web, apparently users can disable this for themselves in Firefox (> version 117) by:

going to about:config in the address bar and changing dom.event.contextmenu.shift_suppresses_event to false

According to this Mozilla support post

Doing some more research on if we can do anything about the browser's behavior on our end

franknoirot commented 1 month ago

It appears to me that this is the intended behavior of Firefox and they don't mouse-heavy web apps as a big enough use case to warrant easier tuning of the context menu than adjusting an advanced browser setting, which is a little frustrating.

Here is a demo of changing this browser setting, from Mac sorry haven't spun up my Linux box yet today but I'm convinced this is not OS-specific.

Demo of user-side workarounds

https://github.com/KittyCAD/modeling-app/assets/23481541/391d71f7-665e-4f70-81fb-c63b0322c512

Suggestions of app-side workarounds

  1. Once my editable keymap branch lands in main we'll have more of an ability to both set browser-specific defaults and let users override them in the way that works best for them. So maybe we set the Pan gesture to be unlocked by a different modifier key (for our default camera settings) only on Firefox.
  2. Maybe we provide a dismissible notification (and louder indication in the onboarding mouse controls step) if the user is on Firefox showing them how to disable this behavior (and/or edit their keymap automatically for them).
jessfraz commented 1 month ago

removed high priority but leaving open unless theres other way