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
The toggling is effective, but one finds oneself at the top of the document, with the cursor at the start of the first line.
One's location in the text should be steady, unaffected by the toggle.
User Profile Reset: No
OpenGL enabled: Yes
Version: 188.8.131.52.alpha0+ / 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
Can not confirm with STR
Version: 184.108.40.206.alpha0+ (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
<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.
Created attachment 170878 [details]
Screen video showing issue with "show outline content visibility button"
I don't know what "STR" and "SB" mean. I suppose the experts here will.
I hope the video helps illustrate the issue.
Steps to Repeat (STR)
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.
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.
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.