Bug 137358 - Cursor positioned before first heading shows incorrect outline position tracking in Navigator
Summary: Cursor positioned before first heading shows incorrect outline position track...
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
(earliest affected)
Hardware: All All
: medium normal
Assignee: Jim Raykowski
Whiteboard: target:7.2.0
Depends on:
Blocks: Navigator
  Show dependency treegraph
Reported: 2020-10-09 05:18 UTC by Jim Raykowski
Modified: 2021-01-17 04:28 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:

file to demonstrate outline position bug (24.14 KB, application/vnd.oasis.opendocument.text)
2020-10-09 05:18 UTC, Jim Raykowski

Note You need to log in before you can comment on or make changes to this bug.
Description Jim Raykowski 2020-10-09 05:18:30 UTC
Created attachment 166214 [details]
file to demonstrate outline position bug

This happens when there is a heading in a frame, header or footer and content before the first heading in the document. In this case the Navigator should not have a heading highlighted when the cursor is positioned before the first heading.

Steps to repro:

1) Open attached file outlineposbug.odt
Cursor is at beginning of document before the word "Title"
2) Open Navigator Menu->View->Navigator (F5) or Menu->View->Sidebar (Ctrl+F5) and select Navigator tab in the tab bar

"Chapter 6" is selected in the Navigator content view Headings content section.

Expected results: 
No selection in the Navigator content view.
Comment 1 Roman Kuznetsov 2020-12-29 17:38:51 UTC
confirm in

Version: (x64)
Build ID: ad9e04321df25824d2288a2ef1f4275f070f1cf7
CPU threads: 4; OS: Windows 6.1 Service Pack 1 Build 7601; UI render: Skia/Raster; VCL: win
Locale: ru-RU (ru_RU); UI: ru-RU
Calc: CL

but there is a strange thing: when I press F5 and it showed me a Navigator floating window with selected Headings item, but after docking the Navigator to its place I saw that Chapter 6 item became selected itself >_<
Comment 2 Jim Raykowski 2020-12-29 21:30:44 UTC
Nice observation of the floating Navigator not tracking the cursor position when initially shown! In certain situations this can also be repro'd using Ctrl+F5 to open the Navigator in the sidebar. The reason for this happening is that the document edit window needs to have focus for Navigator tracking to update. I will include a fix to update tracking on Navigator showing with the fix for this bug report.
Comment 3 Jim Raykowski 2020-12-30 00:26:53 UTC
Here is a patch for both issues:

Comment 4 Commit Notification 2021-01-16 22:32:08 UTC
Jim Raykowski committed a patch related to this issue.
It has been pushed to "master":


tdf#137358 Fix incorrect outline position returned

It will be available in 7.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:

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