Bug 141390 - Toggling "show outline content visibility button" sends one to the top of the document
Summary: Toggling "show outline content visibility button" sends one to the top of the...
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
(earliest affected)
Hardware: All All
: medium normal
Assignee: Not Assigned
Depends on:
Blocks: Writer-Outline-Folding
  Show dependency treegraph
Reported: 2021-03-31 14:30 UTC by j.a.swami
Modified: 2021-05-20 05:08 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:

Screen video showing issue with "show outline content visibility button" (1.70 MB, video/webm)
2021-03-31 17:21 UTC, j.a.swami

Note You need to log in before you can comment on or make changes to this bug.
Description j.a.swami 2021-03-31 14:30:54 UTC
With "outline folding" enabled, toggling "show outline content visibility button" on or off loses one's position in the text and sends one to the top of the document. 

Steps to Reproduce:
1. Enable the "outline content visibility" feature.
2. Load a document with subheads and text.
3. Place your cursor anywhere in the document -- halfway down, for example.
4. Toggle "show outline content visibility button" on or off

Actual Results:
The toggling is effective, but one finds oneself at the top of the document, with the cursor at the start of the first line.

Expected Results:
One's location in the text should be steady, unaffected by the toggle. 

Reproducible: Always

User Profile Reset: No

OpenGL enabled: Yes

Additional Info:
Version: / LibreOffice Community
Build ID: a22357213807fa46b903e7d040809cff194c39af
CPU threads: 4; OS: Linux 5.4; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
TinderBox: Linux-rpm_deb-x86_64@86-TDF, Branch:master, Time: 2021-03-29_12:01:23
Calc: threaded
Comment 1 V Stuart Foote 2021-03-31 16:13:45 UTC
Can not confirm with STR

Version: (x64) / LibreOffice Community (TB77 2021-03-26)
Build ID: f96004096268f5e71120678e32fc8c74055819aa
CPU threads: 4; OS: Windows 10.0 Build 19042; UI render: Skia/Vulkan; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: threaded

<ctrl>+<F6> to focus back onto document canvas from SB returns cursor focus to same location. I do have entries in first/last name/initials fields of the customize dialog.
Comment 2 j.a.swami 2021-03-31 17:21:03 UTC
Created attachment 170878 [details]
Screen video showing issue with "show outline content visibility button"
Comment 3 j.a.swami 2021-03-31 17:23:58 UTC
I don't know what "STR" and "SB" mean. I suppose the experts here will. 

I hope the video helps illustrate the issue.
Comment 4 V Stuart Foote 2021-03-31 17:39:11 UTC
Steps to Repeat (STR)

SideBar (SB)
Comment 5 V Stuart Foote 2021-03-31 19:11:59 UTC
OK, this is the "Show outline content visibility button" toolbar button--currently only visible when Tools -> Options -> Advanced "Experimental Features" is checked enabled, and assigned to a toolbar by customize dialog.  Confirm its


control does misplace focus issue as shown in the screen captures when the buttons are shown on canvas.

The related Toggle Outline Content Visibility


does not seem to have an issue with changing focus.

Movements working from the SB Navigator with or without the content navigation view seem correct.

Comment 6 Jim Raykowski 2021-04-18 22:36:56 UTC
The .uno:ShowOutlineContentVisibilityButton is a shortcut to turn the outline folding mode on and off. 

One issue with keeping focus at the cursor position is when it is in outline content that will become folded. A solution for this is to move the cursor to the outline heading frame. 

I've poked around at trying to keep current view position after the folding mode is changed but thus far no success.
Comment 7 Jim Raykowski 2021-05-14 04:32:52 UTC
Merged https://gerrit.libreoffice.org/c/core/+/114255 is a rehack of the outline folding feature. It includes a behavior change to keep the cursor position visible after toggle. Note the cursor position may be moved to the visible parent outline node if the toggle would result in the cursor being not visible due to being in folded content.