-
-
Notifications
You must be signed in to change notification settings - Fork 21.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Renaming file in file explorer not working on lost focus #78789
Comments
The is a check for focus when renaming. It should probably check visibility: godot/editor/filesystem_dock.cpp Lines 2139 to 2152 in 9a09ee5
Although I think it prevents renaming files when another editor is focused, so maybe it should stay this way. Though the fact that the dock is not focused when context menu opens is a bug. |
Possibly this might get solved by #75062 |
IMO removing context menu when focus is not there is really bad, since it will impact other existing functionalities that work. Although #75062 will resolve the main issue, also consider changing the name in the menu itself. |
Renaming should work without the dock having/retaining keyboard focus. Note that the scene tree dock doesn't have this issue. It does exhibit an odd focusing behaviour, however. When you activate "Rename..." in a Node's context menu, the scene tree dock grabs keyboard focus, presumably to facilitate typing the new name. Obviously the keyboard events must be captured somehow, but the dock then retains KB focus after the interaction ends. Renaming is the only context menu action that does this.
I can't speak for the intended behaviour, but I thought it was by design that KB focus is not given to the docks unless absolutely necessary, so as to not interfere with the main editor. For example, starting in the script editor, you can right click on a property/node/file, copy its name/path and then paste it in the script (using the keyboard) without having to manually move focus back to the script editor. The only Control that gets KB focus when you open a context menu (that I can find) is TextEdit/LineEdit, which is a fairly common pattern in desktop GUI applications. |
I'm just confirming that this issue still exists in v4.2.dev3.official [013e8e3] on Linux. |
This seems to be fixed in v4.2.dev5.official [e3e2528] |
Right, it was fixed by #80440 Right-clicking a file focuses the dock now. |
Why not change it so that a right click in this panel puts the focus on this panel? |
Godot version
4.1.rc.1
System information
Windows 11
Issue description
When you try to rename a file in file explorer, if the focus is lost from the file explorer it does not work.
Although, it works when the file explorer is in focus.
renaming.on.lost.focus.not.working.mp4
All other functionalities like "Duplicate..." works even if the focus is not there.
Note: Also the name of the Rename menu should remove three dots after name as it does not invoke a dialog anymore, if we are following standards.
Steps to reproduce
Select a file in the file explorer and click on the text editor to ensure focus is lost (highlighted color border should not be there on file explorer)
Now right click the file in file explorer and click "Rename..."
Nothing happens
Minimal reproduction project
N.A
The text was updated successfully, but these errors were encountered: