Losing focus after confirmation

Losing focus also occurred with this button. No @confirm but it does have a dialog box

[code]// Code by Leo
// Creating folders from filename

@nofilenamequoting
@set dir={dlgstringS|Enter name of folder to move selection into|{file|noterm|noext}}
Copy MOVE TO="{sourcepath$}" CREATEFOLDER="{$dir}"
@nodeselect[/code]

The same code without the dialog box does not lose focus.

[code]// Code by Leo
// Creating folders from filename

@nofilenamequoting
@runonce:@set dirname={file$|noext}
Copy MOVE HERE FILE="{file$}" CREATEFOLDER="{$dirname}"
@nodeselect[/code]

For me, I notice it all the time because I have Firefox open behind Dopus. After a dialog box appears and after the operation finishes, Firefox jumps in front of Dopus.