Bug 142219 - find-next and find-backwards not consistent
Summary: find-next and find-backwards not consistent
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
6.0.0.3 release
Hardware: All macOS (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Find-Search
  Show dependency treegraph
 
Reported: 2021-05-11 15:48 UTC by birnbach@posteo.de
Modified: 2023-05-11 14:51 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
demo text with open search field (77.83 KB, image/png)
2021-05-13 13:27 UTC, birnbach@posteo.de
Details

Note You need to log in before you can comment on or make changes to this bug.
Description birnbach@posteo.de 2021-05-11 15:48:07 UTC
Description:
CTRL-F opens a search field on the bottom of the current text page which permits entering a search term. Repeated search can be achieved with CTRL-G and repeated backwards-search with CTRL-SHIFT-G. 

However, this works only while the little search field is displayed. Otherwise, CTRL-SHIFT-G does nothing. 

Also, CTRL-G sometimes goes up instead of down. If the last search with the search field open was a backwards search, pressing CTRL-G with a closed search field will perform a backwards search instead of a forward search.

Steps to Reproduce:
The real problem is that CTRL-G and CTRL-SHIFT-G do not work for "find next" and "find previous" with the quick search field closed as they do with the field open. 

However, here is how to reproduce the wrong-direction-search:
1. create a document with this text:
foo bar something foo bar foo baz more foo something foo else foo blah
2. press CTRL-F to bring up the quick search field on the bottom of the document
3. enter 'foo' as the text to search for
4. press CTRL-SHIFT-G repeatedly and note how the found occurrences jumps backwards through the text
5. press ESC to close the search field
6. press CTRL-G 

Actual Results:
found occurrences jumps through text in backward direction

Expected Results:
found occurrences jumps through text in forward direction


Reproducible: Always


User Profile Reset: Yes



Additional Info:
Version: 7.1.2.2 / LibreOffice Community
Build ID: 8a45595d069ef5570103caea1b71cc9d82b2aae4
CPU threads: 4; OS: Mac OS X 10.13.4; UI render: default; VCL: osx
Locale: de-DE (de_DE.UTF-8); UI: de-DE
Calc: threaded
Comment 1 Harshita Nag 2021-05-13 07:15:55 UTC
Not able to reproduce this. Please attach a screencast of this issue for better clarity.
Comment 2 birnbach@posteo.de 2021-05-13 13:27:55 UTC
Created attachment 171959 [details]
demo text with open search field

A screencast will not show keyboard presses, which are essential here. However, I enclose a screenshot and hope this explanation will help:

In the screenshot, the search field is open (lower left corner, with text 'foo') and the cursor is in it. Under these conditions search works as expected: CTRL-G searches forward, CTRL-SHIFT-G backwards.

Now, if the cursor is placed into the document or the search field is closed (e.g. by pressing ESC), CTRL-SHIFT-G will stop doing anything useful. CTRL-G will repeat the last search from back when the cursor was in the search field. As this may have been a forward or a backward search, CTRL-G may or may not invert its behaviour. 

It seems to me that CTRL-G should //always// perform a forward search and CTRL-SHIFT-G //always// a backward search with the last search string. The present behaviour stands in contrast to what a user is accustomed to from other applications.
Comment 3 psidiumcode 2021-05-17 18:39:20 UTC
I could reproduce it. Note that in MacOS I used CMD-F for the search field, CMD-G for forward search, and CMD-SHIFT-G for backwards search. 

Version: 7.0.5.2
Build ID: 64390860c6cd0aca4beafafcfd84613dd9dfb63a
CPU threads: 12; OS: Mac OS X 10.15.7; UI render: default; VCL: osx
Locale: en-GB (en_GB.UTF-8); UI: en-US
Calc: threaded

Version: 7.2.0.0.alpha0+ / LibreOffice Community
Build ID: b137ff671f25a605334083c0f87ada84eaa0fcf2
CPU threads: 12; OS: Mac OS X 10.15.7; UI render: default; VCL: osx
Locale: en-GB (en_GB.UTF-8); UI: en-US
Calc: threaded