Created attachment 155174 [details] headings test file Headings are tracked in the Navigator when content navigation view is in Headings root mode. When the context menu is activated for a heading entry in the Navigator which is not the heading of current cursor position in the document the selected heading will jump to the heading entry in the Navigator content list that has cursor position focus in the document. Steps to repro: 1) Open the attached headings test file 2) Open the Navigator - Menu > View > Navigator or F5 3) Toggle to Headings root mode - Click the Content Navigation View button in the tool box above the content tree. It's the first button on the second line. 4) Right click on any heading other than the focused heading Results: After the context menu is displayed focus jumps to heading entry in list that has focus in the document. Expected results: Focus remains on heading entry which right click was done to access the context menu.
I confirm it with Version: 6.4.0.0.alpha0+ (x64) Build ID: 758516295e5f69393bd78bb4af6e7214d48ece0b CPU threads: 4; OS: Windows 10.0 Build 18362; UI render: GL; VCL: win; Locale: de-DE (de_DE); UI-Language: en-US Calc: threaded
Reproduced in Version: 5.2.0.0.alpha1+ Build ID: 5b168b3fa568e48e795234dc5fa454bf24c9805e CPU Threads: 4; OS Version: Linux 4.15; UI Render: default; Locale: ca-ES (ca_ES.UTF-8 but not in Version: 4.4.0.0.alpha0+ Build ID: 9835a5823e0f559aabbc0e15ea126c82229c4bc7
I bibisect the change of behavior to this commit: commit a0c700b1493c7b51540d1e77b44d1edd9bf920f0 Author: Caolán McNamara <caolanm@redhat.com> Date: Tue Feb 23 15:57:11 2016 +0000 gtk3: implement native context menus This reuses lots of the unity machinery which is similar to the mac concept of a single toplevel menubar. So to drive popup menus, part of this is a rework that does away with the idea that the "menubar" is the controller of the hierarchy, and instead the top element becomes the controller Change-Id: I4336391718844bc73cfc47c1043f99f0e3b812d8 Version: 5.2.0.0.alpha0+ Build ID: a0c700b1493c7b51540d1e77b44d1edd9bf920f0 CPU Threads: 4; OS Version: Linux 5.0; UI Render: default; Locale: en-US (en_US.UTF-8) ---- I think the changes that were made in this commit require a change to how the headings are tracked. Instead of not tracking only when the content tree has focus, only track when the document has focus. This solves the problem of selection changing when the content tree loses focus to the context menu.
Here is a patch for review and comments: https://gerrit.libreoffice.org/#/c/81539/
Jim Raykowski committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/a7fdd0a78bc613fd3e376880b77a2c82edbccefe tdf#128285 Only update Navigator heading tracking if document has focus It will be available in 6.4.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.
*** Bug 120281 has been marked as a duplicate of this bug. ***
Verified in Version: 6.4.0.0.alpha1+ Build ID: 2d0a4182712673d8f7a5abe919cd2a1d5ece4a77 CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3; Locale: ca-ES (ca_ES.UTF-8); UI-Language: en-US Calc: threaded @Jim Raykowski, thanks for fixing this issue!