Page 1 of 1

file/ folder loses focus after renaming

Posted: 2018-06-17 12:41
by flow
The selected file/ folder loses focus after renaming - instead, the previously active UI element gets the focus, in my case the "Host" input field.

Why this matters:
After renaming a file or folder you have to use the mouse again or use TAB several times to focus the file again. Especially for keyboard users, this makes renaming several files quite annoying.

How to reproduce:
- click on a file or folder to select it
- press F2
- change the name
- hit Enter
- notice how you can't use the up/ down keys to move to other files

Re: file/ folder loses focus after renaming

Posted: 2018-06-17 17:12
by botg
Yet another feature of Windows 10...

Re: file/ folder loses focus after renaming

Posted: 2018-06-17 19:34
by flow
botg wrote:
2018-06-17 17:12
Yet another feature of Windows 10...
Does that mean you're aware of this issue and are about to fix it? :D

Re: file/ folder loses focus after renaming

Posted: 2018-06-17 19:40
by botg
Now I'm aware of the issue and I seems Microsoft needs to fix it, they broke something in Windows 10. All I could do is work around it, which has drawbacks.

Re: file/ folder loses focus after renaming

Posted: 2018-06-17 20:10
by flow
botg wrote:
2018-06-17 19:40
Now I'm aware of the issue and I seems Microsoft needs to fix it, they broke something in Windows 10. All I could do is work around it, which has drawbacks.
Since we all know how quick Microsoft often is (hint: https://giphy.com/gifs/road-snail-RCBQSWiMPTQly) I'd appreciate a workaround from you. :)

Re: file/ folder loses focus after renaming

Posted: 2018-06-17 23:46
by boco
Sometimes you wonder what they do these days in Redmond, WA...

- Drag and Drop broken in 1803
- This focus problem, system wide and occurs since a few versions back. It even goes so far as to focus the previous Explorer window after each file operation. Doesn't get to attention unless you give every directory its own Explorer window, which I always do.
- plus a million other bugs we learned to live with

DON'T PANIC - IT'S WINDOWS!

Re: file/ folder loses focus after renaming

Posted: 2018-06-18 07:04
by botg
For renaming/deletion, FileZilla uses SHFileOperation to allow things like undo. One workaround would be to use a standard recursive deletion that doesn't use SHFileOperation, but also doesn't allow undo.

Re: file/ folder loses focus after renaming

Posted: 2018-06-18 07:20
by flow
Hmm... interesting. FileZilla doesn't support the use of Window's undo hotkey, but when I switch to the Windows Explorer I can undo a name change I did in FileZilla.

Re: file/ folder loses focus after renaming

Posted: 2018-06-19 07:29
by botg
I've committed a workaround for this issue, the current focus is remembered before calling SHFileOperation and set back afterwards.

Re: file/ folder loses focus after renaming

Posted: 2018-06-19 07:52
by flow
Thanks, looking forward to the update!