When calling the find / search bar (Ctrl+F) with selected text, the existing search query's text should be all preselected
I very frequently hit Ctrl+F
when I want to bring up / focus the search bar to make a new search, after having dismissed it with Esc
.
When dismissing the search bar, the highlighted text contents in the main canvas remains selected (which is expected).
However, currently, when calling the search bar back with Ctrl+F
and that existing selected text in the contents, the app preserves the previous search query text but only focuses the search entry by putting the text cursor at the end. The result is that I end up typing (or pasting) what I want to search and it fails everytime because it's actually appended to whatever the previous search was.
(In the case of Epiphany, I've had this misbehave consistently with "web apps" because for some reason some URL always gets preselected in them, and I couldn't figure out why, but that's besides the point)
The "pre-select-all" behavior would be consistent with other applications such as Firefox (including its PDF reader), Chromium, LibreOffice, Thunderbird, Gedit, GNOME Builder, etc. Here's the behavior in Firefox (and Chromium) with multiple matches:
- If you press the
Esc
key, it closes the searchbar and de-highlights the highlighted text (though the selection remains) from the web view. Epiphany already does this correctly. - When you hit
Ctrl+F
again to recall the closed search bar, the searchbar has the currently selected text present in it (or the previously queried text, if I had manually deselected the text on the canvas in the meantime) BUT it is all pre-selected, which is what this bug report is primarily about.
99% of the time I want to replace my query to search for something different; otherwise, if my search-as-you-type query was incomplete, I would have just completed typing it the first time around before hitting Esc
or Enter
; and if I somehow wanted to append upon calling back the search entry after having dismissed it with Esc
(which again is rare, because if that was the case I would not have dismissed the searchbar in the first place), I would use the "right arrow" key to deselect and move the cursor to the end of the string.
So, in summary: when the find bar is pre-populated with existing text (such as the currently selected text on the canvas, if any), it should be all pre-selected in the SearchEntry widget, so that anything I type or paste replaces the search query; if I wanted to append, I would use the right arrow key before typing.