Bug 146178 - Allow navigate by field to advance from last field of document to the first field in the stack, and reverse
Summary: Allow navigate by field to advance from last field of document to the first f...
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.2.4.1 release
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard: target:7.6.0
Keywords:
Depends on:
Blocks: Navigator Find-Toolbar
  Show dependency treegraph
 
Reported: 2021-12-11 13:43 UTC by Stéphane Guillou (stragu)
Modified: 2023-03-31 15:12 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
example document to test (10.40 KB, application/vnd.oasis.opendocument.text)
2021-12-11 13:45 UTC, Stéphane Guillou (stragu)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Stéphane Guillou (stragu) 2021-12-11 13:43:41 UTC
Description:
"Navigate by" field and field type were added to fix Bug 137741.

When navigating by field using the arrows, it is not possible to jump from the end of document to the beginning, or vice versa, like other types allow (e.g. headings or drawings).

Steps to Reproduce:
1. Open example document (or create various fields in a new document)
2. Open Navigator sidebar
3. Switch to "Field" in the "Navigate by" dropdown
4. Click the down arrow repeatedly to reach the end of the document, keep clicking

Actual Results:
Nothing happens.

Expected Results:
The cursor jumps back to the first field from the top of the document, with the usual message "Reached the end of the document, continued from the beginning" in the Find toolbar.


Reproducible: Always


User Profile Reset: No



Additional Info:
This should work both ways: back to top when reaching the end of the document, and start from bottom when reaching the top of the document.

Tested with:

Version: 7.2.4.1 / LibreOffice Community
Build ID: 27d75539669ac387bb498e35313b970b7fe9c4f9
CPU threads: 4; OS: Linux 5.4; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded
Comment 1 Stéphane Guillou (stragu) 2021-12-11 13:45:06 UTC
Created attachment 176865 [details]
example document to test
Comment 2 Stéphane Guillou (stragu) 2021-12-11 13:46:16 UTC
also reproduced in:

Version: 7.3.0.0.beta1 / LibreOffice Community
Build ID: 436f14c25ec1847646b953cf13d0db4f7ca3be57
CPU threads: 4; OS: Linux 5.4; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded
Comment 3 V Stuart Foote 2021-12-11 15:30:59 UTC
Expect you mean to advance 'next' from the last field around to the first field of the document--that seems reasonable. And would we need 'previous' to step round from the first field to the last in the stack.

J@Jim, feasible?
Comment 4 Jim Raykowski 2021-12-12 07:14:15 UTC
It just so happens I have put in a proposal patch to change navigating by comment behavior that can be used as a code pointer to realize this request. 

https://gerrit.libreoffice.org/c/core/+/126697

Almost identical code can be added for the NID_FIELD case. Better yet would be to make a local function to use in NID_FIELD and NID_POSTIT cases that takes argument SwFieldIds::Unknown or SwFieldIds::Postit.
Comment 5 Commit Notification 2023-01-26 03:13:14 UTC
Jim Raykowski committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/60035ea9b46f10351ef0bd56d4999bc43558dd33

tdf#146178 Allow navigate by field to advance from last field

It will be available in 7.6.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 6 Stéphane Guillou (stragu) 2023-03-31 15:12:41 UTC
Fix verified in:

Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 1b463f697405e64a03378fb38a32172c4d3c25e6
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded

Thanks Jim!