Context menu accidentally triggered when attempting to drag an app icon
Affected version
- Endless OS, gnome-shell 3.38.0+dev61.dc61995-15bem1, X11, real hardware
- Fedora Silverblue 33, gnome-shell-3.38.1-2.fc33.x86_64, Wayland, in GNOME Boxes
Bug summary
When beginning a drag in the app grid, it is too easy to accidentally trigger the context menu with a long-press instead.
Steps to reproduce
- Open the app grid
- Point to an app icon
- Press and hold the left mouse button
- Do not move the mouse cursor for about half a second
- Now try to drag the icon by moving the mouse
What happened
At step 4, a pop-up menu appears, just as if I had right-clicked. If I continue to hold the mouse button down and try to begin a drag, no drag occurs.
However, I can't just move the mouse over a menu item and release the button to activate it: I have to release the button, then move it over a menu item, and click it again.
I often accidentally trigger a pop-up menu when trying to drag, particularly when I am trying to be deliberate in my actions (for example, to report a bug). I see this frequently when watching others at Endless interact with the icon grid, too.
What did you expect to happen
When using a mouse, as opposed to a touch screen, the pop-up menu should not be triggered by a long-click without moving. Outside the Shell, no other places in GNOME have this "long-press = secondary-click" behaviour, unless I enable an accessibility option for this behaviour.
On devices where this long-press behaviour is desired, if the pop-up menu is triggered, then attempting to drag the icon (without releasing the touch) should dismiss the pop-up menu and begin a drag.
As related prior art, this second point matches the behaviour of the Android home screen and app grid, at least on my Pixel 3:
- A long press on an icon opens a context menu
- Moving my finger while the menu is open drags the icon
- Once I move my finger more than some minimum distance, the menu closes
- But, if I release my touch without crossing that drag threshold, I can then interact with the menu