mouse-autoselect-window should wait to select the window until the mouse is put to rest or after a delay or both, so that moving over a window doesn't select it.
Attach a file by drag & drop or click to upload