[scite] Focus on Find dialog

24 views
Skip to first unread message

John Yeung

unread,
Sep 25, 2012, 11:26:18 AM9/25/12
to scite-interest
I prefer to stick with the Find dialog rather than the strip, and
lately I have been noticing that when I have the focus in the dialog
(say, entering in part of the search string) and then switch
applications and then switch back, the focus returns to the editing
window instead of the dialog, even though the dialog is still open.

To me, it seems more intuitive for the focus to return to the dialog,
since that is where it was when I left it. Has it always behaved the
way it does now? I don't remember being distracted/disturbed by this
in earlier (much earlier?) versions of SciTE. I could be imagining
it, though, or my usage patterns may have changed.

Coincidentally, there was a recent thread about the focus behavior for
the Find strip. I tried it to see if it would work better for me, and
while the focus does return to the strip (no doubt to some people's
consternation), it comes back with the whole input field highlighted,
even though I didn't have anything highlighted when I left the strip.
If the state of the strip would just stay the way I left it, that
might be enough to convert me. (But if it's just as easy to modify
the dialog focus behavior, I would go that route.)

John

Philippe Lhoste

unread,
Sep 26, 2012, 3:56:50 AM9/26/12
to scite-i...@googlegroups.com
On 25/09/2012 17:26, John Yeung wrote:
> I prefer to stick with the Find dialog rather than the strip, and
> lately I have been noticing that when I have the focus in the dialog
> (say, entering in part of the search string) and then switch
> applications and then switch back, the focus returns to the editing
> window instead of the dialog, even though the dialog is still open.
>
> To me, it seems more intuitive for the focus to return to the dialog,
> since that is where it was when I left it. Has it always behaved the
> way it does now? I don't remember being distracted/disturbed by this
> in earlier (much earlier?) versions of SciTE. I could be imagining
> it, though, or my usage patterns may have changed.

I just tried (SciTE 3.2.1 on Windows 7) and with the actions you describe (leave SciTE
with dialog open and focus there, switch to a browser then switch back to SciTE), the
focus is still in the dialog.

> Coincidentally, there was a recent thread about the focus behavior for
> the Find strip. I tried it to see if it would work better for me, and
> while the focus does return to the strip (no doubt to some people's
> consternation), it comes back with the whole input field highlighted,
> even though I didn't have anything highlighted when I left the strip.
> If the state of the strip would just stay the way I left it, that
> might be enough to convert me. (But if it's just as easy to modify
> the dialog focus behavior, I would go that route.)

Personally, I adopted the strip (but not for Replace, the dialog richer for me) and I
haven't noticed what you describe, but indeed it selects the whole field content. I
believe that's the standard behavior of Windows for text fields. Perhaps annoying, but
hitting Home key easily fixes that. The problem is that some people might prefer the
current behavior, and actually the need can vary on case per case (one time it is nice to
just start to type to replace the content, sometime we want to complete the typing...).
Ctrl+A and Home (or End) being easy to fix that (among other shortcuts), that's, to my
eyes, a minor problem.

--
Philippe Lhoste
-- (near) Paris -- France
-- http://Phi.Lho.free.fr
-- -- -- -- -- -- -- -- -- -- -- -- -- --

Neil Hodgson

unread,
Sep 26, 2012, 8:01:58 AM9/26/12
to scite-i...@googlegroups.com
Philippe Lhoste:

> I just tried (SciTE 3.2.1 on Windows 7) and with the actions you describe (leave SciTE with dialog open and focus there, switch to a browser then switch back to SciTE), the focus is still in the dialog.

There may be other factors like the part of the main window that had focus, whether the dialog is modal and how the switch was done. Tried with the Find dialog using Alt+Tab with SciTE 3.2.2 and 2.0 and it moved focus onto the main window instead of the find dialog.

There is code in the WM_ACTIVATE handler to set focus.

Neil

John Yeung

unread,
Sep 26, 2012, 9:18:57 AM9/26/12
to scite-i...@googlegroups.com
> Tried with the Find dialog using Alt+Tab with SciTE 3.2.2
> and 2.0 and it moved focus onto the main window instead
> of the find dialog.

Yeah, I should have specified I was using Alt+Tab to switch. When I
use the mouse, the focus returns to the dialog with any preexisting
search string highlighted.

John
Reply all
Reply to author
Forward
0 new messages