Sublime Forum

Drag and drop files and focus on Sublime

#1

Hi everyone,

I use ST3 in Windows 10. I sometimes open files by dragging them from File Explorer and dropping them in ST3. Unfortunately, Windows keep the focus on the File Explorer, and as I press ctrl+w to close Sublime and open a new file, it closes File Explorer. This may not be a fair comparison, but I noticed that after you drag and drop a file in Chrome, Windows focuses on Chrome. Anyway, is there a way to make Windows focus on Sublime after you drop a file in it?

Any thoughts are appreciated.

1 Like

#2

It looks like this problem exists on the latest dev build ST 4094 on Windows 10 as well. I would suggest to actually open an issue on the issue tracker if one doesn’t exist.

0 Likes

#3

I’ve made an issue for this here: https://github.com/sublimehq/sublime_text/issues/3877

0 Likes

#4

Thank you, guys! I appreciate it.

0 Likes

#5

Did you try hovering over ST3 for a while? What happens if you do? I can imagine that a user would want to repeat the drop action from the File Explorer repeatedly making focus stealing the wrong kind of action.

I would urge the fixer to consult the HIG if any for Windows before stealing focus on drop.

0 Likes

#6

Only hovering over the taskbar will change focus. As stated in the issue there isn’t any consistency for this behaviour between applications on Windows.

0 Likes

#7

Is there a reference to this in the HIG? If not can I make a request that a drop does not cause a focus steal when a modifier key is pressed?

0 Likes

#8

Thank you guys for help!

0 Likes