eclipse-theia / theia

Eclipse Theia is a cloud & desktop IDE framework implemented in TypeScript.
http://theia-ide.org
Eclipse Public License 2.0
19.87k stars 2.48k forks source link

Menu bar does not open on first click when certain sidebar elements have focus #14002

Open iamfraggle opened 1 month ago

iamfraggle commented 1 month ago

Bug Description:

When certain sidebar elements have focus, clicking on the menu bar does not open the selected menu group, but appears to 'weaken' the focus on the element, thus another click will open the menu group.

Clicking again on the menu group to close it returns focus to the original element and so the bug will repeat if attempting to reopen the menu.

For an example of 'weakening focus': when the search input box has focus, the first click on the menu bar will remove the "(up/down for history)" text from the input box, but the insertion caret will still be flashing.

Steps to Reproduce:

  1. Click inside an affected sidebar panel or on it's icon in the side panel selector
  2. Click on the menu bar

Here is the results of my experimentation on whether different sidebar elements exhibit the bug behaviour (Yes means affected): Explorer

Additional Information

JonasHelming commented 1 month ago

Thank you for the very detailled test! I have issue reproducing this, though, but I might be doing something wrong.

I open the search view do nothing (input field is focussed) OR I explicitly set the focus in the input field. Then I open a menu, e.g. "File" => This works for me.

Am I doing the right steps? Maybe this is a Windows issue only, I am on Linux.

tsmaeder commented 1 month ago

I'm on Windows and simply doing this reproduces the issue:

  1. Left-Click on the "Explorer" view icon in the right side bar
  2. Left-Click on "Selection" in the window menu bar.
  3. Observe: the menu does not open
tsmaeder commented 1 month ago

I think the relevant difference is whether the window.titleBarStyle preference is "native" or "custom". "Custom" has the problem, "native" doesn't.

JonasHelming commented 1 month ago

@tsmaeder Could you decide on a prio and add it to https://github.com/eclipse-theia/theia/issues/13192 please?

tsmaeder commented 1 month ago

While it's a clearly a bug, I would classify this as low prio:

  1. It is easily worked around by simply clicking again or using the native title bar
  2. I've been using Theia as my only IDE for a year and I've never noticed it: the case where you click on a sidebar element and then immediately on the main menu is just not something one would often do: usually when you reveal a sidebar item, you click on something inside that sidebar item as the first thing.

@iamfraggle do you have a frequent workflow that is hindered by this issue?

iamfraggle commented 1 month ago

I've just been trying Theia IDE out for the first time, so no frequent workflow. I agree that it's a nuisance rather than a showstopper.