Bug 168560 - Find Sidebar: If a new search is to be started, the last search is not selected.
Summary: Find Sidebar: If a new search is to be started, the last search is not selected.
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
24.8.0.3 release
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard: target:26.2.0 target:25.8.3
Keywords:
Depends on:
Blocks: Sidebar-Find
  Show dependency treegraph
 
Reported: 2025-09-26 13:25 UTC by Orwel
Modified: 2025-09-30 11:13 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Orwel 2025-09-26 13:25:18 UTC
Description:
The Find sidebar can be opened using the Alt+9 shortcut. If you perform a search and then return to editing the document, a further pressing Alt+9 will take you to the search field, but it will not highlight (select) the last search string. To set a new string for search, you must manually delete the old value.

Steps to Reproduce:
1. Open document, write some text.
2. Press Alt-9 and write some search string into the field, press ENTER.
3. Go back to the document and edit it.
4. Press Alt-9.

Actual Results:
You are brought to the Find field, but the previous string remains without to be selected. Old string has to be deleted manually.

Expected Results:
The same behaviour but with selected text, so you directly start to write the new string, which will delete the old one.


Reproducible: Always


User Profile Reset: No

Additional Info:
Version: 25.2.3.2 (X86_64) / LibreOffice Community
Build ID: bbb074479178df812d175f709636b368952c2ce3
CPU threads: 16; OS: Windows 10 X86_64 (10.0 build 19045); UI render: Skia/Raster; VCL: win
Comment 1 V Stuart Foote 2025-09-29 00:25:14 UTC
Annoyance confirmed, currently the SB Find deck is limited to one search string that must be cleared on reopening if a new/repeat search is needed for work flow.

Seems the SB Find deck could be improved by reusing the same "FindReplaceRememberedSearches" controlled input and stack handling used by the <Ctrl>+H Find and Replace and the <Ctrl>+F Quick Find bar (and the Repeat Search of the SB Navigator deck)?
Comment 2 Jim Raykowski 2025-09-29 07:26:41 UTC
For me, gtk3/4 vcl plugins select the text in the search/find entry when Alt-9 is pressed. x11/win and qt5/6 vcl plugins do not. It doesn't look easy to change the behavior of these to match the gtk3/4 behavior. Possibly after pressing Alt-9, pressing Ctrl-a to select all text in the search/find entry is close enough?
Comment 3 Heiko Tietze 2025-09-29 08:13:52 UTC
We should aim for an automatic full selection. How about doing it programmatically when the control receives focus? The F&R dialog does the expected, maybe we have a line of code that can be taken into the sidebar method.
Comment 4 Orwel 2025-09-29 08:40:24 UTC
Thank to all for the effort.

(In reply to Jim Raykowski from comment #2)
> Possibly after
> pressing Alt-9, pressing Ctrl-a to select all text in the search/find entry
> is close enough?
As a user, I would argue that this is insufficient. All the apps I know perform auto-selection on the next search. The Alt-A shortcut is therefore inconvenient, as it requires users to remember the special behaviour in LO. I would like to mention a similar bug existed in another app (as I can remember, it was PDF Foxit Reader) a few years ago, which was also heavily criticized within the community.
Comment 5 Jim Raykowski 2025-09-29 09:18:48 UTC
I gave selecting the text in the find entry during focus in a shot. It has a bit of glitch with gtk3/4. I notice the same issue with the F&R dialog. When keyboard focus is not in the find box and text in the find box is not selected and the mouse is clicked on the text it becomes selected and then not selected.

https://gerrit.libreoffice.org/c/core/+/191600
Comment 6 Commit Notification 2025-09-29 18:46:25 UTC
Jim Raykowski committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/4f33bb0f672a450ee5f2a4fd502398f2008fd7a8

tdf#168560 Sidebar Find: Select text on keyboard focus in find entry box

It will be available in 26.2.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 7 Commit Notification 2025-09-30 11:13:17 UTC
Jim Raykowski committed a patch related to this issue.
It has been pushed to "libreoffice-25-8":

https://git.libreoffice.org/core/commit/63765c15a10cf41123c31b917d7aa9358405456b

tdf#168560 Sidebar Find: Select text on keyboard focus in find entry box

It will be available in 25.8.3.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.