Right-clicking file or folder in Favorites on Mac now auto-selects on button release
This started happening within the last update, and isn't happening in the Project panel ever.
The only way I can select an option in the menu is to keep holding down the right-click button, hover over the option I want, then release.
It doesn't behave like a normal right-click anymore. It's driving me crazy.
Please sign in to leave a comment.
I guess I can't explain why 99% of my right-click release misclicks (and they're all misclicks because I don't like using that method) are in PHPStorm.
Maybe PHPStorm's right-click menu opens too close to the mouse pointer, as in, closer than normal for Mac.
I think I figured out why it's happening, and it appears to be a complete Mac thing, though may be avoidable with a PHPStorm.
The right-click menu in the Project panel always opens so that it starts below the mouse pointer, but in the Favorites panel it always starts above the mouse pointer, so that any tiny movement of the mouse (which I'm not even perceiving or isn't showing usually) apparently considers it a mouse pointer move into the menu item before button release... and because Mac by default selects whatever you move+release to, that miniscule/unnoticeable/invisible difference causes it to think I meant to select it.
I don't know why this hasn't happened before, but maybe this mouse (Bluetooth Logitech) has started giving off random imperceptible movements (maybe due to battery or wear) to macOS that it's interpreting as movements even if the pointer's position doesn't change (or not visibly). :/
Anyway, if I can figure out how to turn off that "move+release select" feature in macOS, maybe that's what I need. Otherwise I'd like to know of a setting in PHPStorm to prevent this "feature" in its menus.
I'd still love to know however if you have advice on this. I haven't found yet how to address the behavior.
To be frank, I am not sure I understand the issue, probably because I cannot reproduce it.
On right-clicking in the Favorites pane, the menu appears, but the mouse pointer is always outside the menu borders, so nothing gets selected in it. Here's a screencast:
https://drive.google.com/file/d/1ODjg-HYFqE2Vqe3XN57ZvGtp00VC8DM9/view?usp=drivesdk
What am I missing?
It comes and goes... last week it didn't do it much. I'll post here if it does it too much again. I'm not sure how you made a screencast.
I think I've discovered why this happens, and it was happening in the Project panel too, very frustratingly.
So, in PHPStorm's right-click menu on Mac (Big Sur at least), the selectable area of each menu item extends to the left-most and right-most edges. I can't tell if this is a theme thing yet. Because macOS right-click will select a highlighted menu item upon release of the right-click button, and because the menu appears right under the mouse pointer, the chances of something auto-selecting upon right-click release is very high.
In Finder, if I right-click an item, the pop-up menu has a buffer area between the selectable portion of the menu item and the border. So it's very easy to not accidentally select an item when releasing right-click.
I realize that macOS' behavior is to select a highlighted menu item upon right-click release (at least if the mouse pointer is also hovering over that highlighted item), but most apps on Mac have this menu border buffer.
If there's some way for PHPStorm to have similar menu item border buffers like most macOS apps have (which I think is the default), then problem solved.
If I can figure out how to disable right-click-release-select, that would also solve the problem, as I'm used to Windows and Linux flavors which do not select upon right-click release.
I don't know, maybe it's my virtual mac that is at fault, but for me, the selectable menu item area almost matches the menu border in Finder as well.
In the meanwhile, I was able these two requests:
https://youtrack.jetbrains.com/issue/JBR-1477
https://youtrack.jetbrains.com/issue/IDEA-267647
JBR-1477, I was able to reproduce by holding the right click before releasing it (as it's described in a hidden comment there). Is there a chance you hold the button a little bit longer when the issue takes place?
Sorry, I should have left screenshots.
Here's my Finder right-click menu item buffer:
Here's my PHPStorm menu item (no buffer):
I can't tell if this is because of the theme, but it would be nice if they behaved the same way. Trying to find out how to disable release-click on Mac is like... trying to negotiate with dandelions.
I notice that PHPStorm's top menu works like Finder's right-click menu:
So why is the non-buffered menu within PHPStorm?
My theme is the default (I think):
Changing the theme or any options there (like Sync with OS) doesn't change the right-click menu item selection area... so there appears to be no way to have them behave like macOS Big Sur default. My guess is Apple added the buffer (I don't know when) to prevent accidental selections upon right-click button release. I think the "feature" of that happening to begin with is bad, but I see no setting in Mac to change it.
There may be some 3rd-party app to disable right-click release click, but I haven't dove in enough to find it yet. I already have to use a 3rd-party app (Karabiner Elements) just to get my Bluetooth iHome keyboard to work right with Mac, which required me overriding a bunch of security options for it on the Mac :/ but really, PHPStorm should try to follow the OS with these menus, or at least have a theme or option that lets us do that (or lets us disable right-click release click in its menus).
At least in macOS 11.4, this buffer is just a visual representation, the actual hitbox spans across the entire menu width.
https://drive.google.com/file/d/1yQBbp3wULMQm8w9fZ3s_V2G9O1H9GNgN
As you can see, the mouse pointer never goes past the menu border, but menu items get selected nevertheless.
Vadiru my 100% of right-click release misclicks are in PHPStorm.
Just as an hypothesis: do you have two monitors with different resolutions? I do, and when PHPStorm is running on the one with lower res, my chances of messing with the menu increases.
Sure a threshold (timing, spacing or both) is absolutely needed to regain the use of right click menu, especially on the lower area of the monitor, because at the moment is very frustrating, I do keep adding unwanted stuff to VCS, checkout to unwanted branches, and wait for diffs I never intended to view.
I should clarify, most of my misclicks are in the Favorites tab... I don't know why 😆
Some days it's worse than others even though the Project panel and everything else behaves the same.
There's just something different about the Favorites panel for me on this Mac for some reason, I sometimes see something distinct happening but it's hard to tell, like a slight blink or something. Sorry if this sounds crazy, I can only speak to the results.
I just merged without any confirmation something that will take again efforts to be removed.
Thank you JB for losing our time.
NO OTHER APPLICATION has the same problem, so please stop saying that is a normal mac-os behavior.
Luca Capuozzo, oh. Really sorry about that, it's really unfortunate.
There's a new similar report on our tracker: https://youtrack.jetbrains.com/issue/IDEA-284137
I've linked the related issues together, and also left a comment in the original issue.
Hopefully, the platform team will take care of it soon.
@Luca Capuozzo
I've done a few accidental merges 😆 and an accidental rebase (!). Some of the auto-clicks have taken some time to reverse there. Ah well. I wish I could tell why these panels are different, but I haven't been able to figure out why yet.
There's just something different with how these panels process right-click release or cursor placement that is different than most others.