Bug 163179 - Opening Navigator (F5) _in docked state_ doesn't bring focus in list with headings/objects
Summary: Opening Navigator (F5) _in docked state_ doesn't bring focus in list with hea...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.0.0.3 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Navigator
  Show dependency treegraph
 
Reported: 2024-09-27 09:26 UTC by Cor Nouws
Modified: 2024-09-29 14:25 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Cor Nouws 2024-09-27 09:26:14 UTC
In versions older than 7.0 the following was possible:

- file with multiple headings
- F5 (navigator opens and gets focus)
- use arrows to go to desired heading (or other object)
- ENTER brings focus in the document to the desired place

This works in 
Version: 6.4.5.2
Build ID: a726b36747cf2001e06b58ad5db1aa3a9a1872d6
CPU threads: 8; OS: Linux 6.8; UI render: default; VCL: gtk3; 
Locale: nl-NL (en_US.UTF-8); UI-Language: en-US
Calc: threaded

This does not work in 
Version: 7.0.0.3
Build ID: 8061b3e9204bef6b321a21033174034a5e2ea88e
CPU-threads: 8; Besturingssysteem: Linux 6.8; UI-render: standaard; VCL: gtk3
Locale: nl-NL (en_US.UTF-8); GI: nl-NL
Calc: threaded

(I didn't check other modules yet)
Comment 1 Cor Nouws 2024-09-27 09:27:48 UTC
@ Jim: pls allow me to add you in CC.
Since you're know for your wonderful work on all the improvements and new features in the Navigator, maybe you have an idea?
Comment 2 Jim Raykowski 2024-09-27 23:36:10 UTC
Hi Cor,

Using the document provided by the Formatted Dummy Text extension[1]:

I first tried to bisect the bug using this bibisect repository[2] without success in reproducing the bug.

Next I checked out the 8061b3e9204bef6b321a21033174034a5e2ea88e commit and looked at the key input handler ENTER handling code. It seems to be correct to place the cursor at the document position associated with the content entry highlighted in the tree.

I tried to do a build from that branch but it didn't go well so I downloaded version 7.0.0.3 for both linux and windows from[3].

I couldn't reproduce the bug with either:

Version: 7.0.0.3
Build ID: 8061b3e9204bef6b321a21033174034a5e2ea88e
CPU threads: 2; OS: Linux 6.8; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threadeddtf

or

Version: 7.0.0.3 (x64)
Build ID: 8061b3e9204bef6b321a21033174034a5e2ea88e
CPU threads: 4; OS: Windows 10.0 Build 22631; UI render: Skia/Vulkan; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: CL

[1] https://extensions.libreoffice.org/en/extensions/show/132
[2] https://bibisect.libreoffice.org/linux-64-7.1
[3] https://downloadarchive.documentfoundation.org/libreoffice/old/7.0.0.3/

Always feel welcome to add me to any bug you think I may be able to help with :-)
Comment 3 Cor Nouws 2024-09-28 14:41:37 UTC
Hi Jim :)

(In reply to Jim Raykowski from comment #2)

> I couldn't reproduce the bug with either:
> 
> Version: 7.0.0.3

Sorry if my report was not clear enough ;)
6.4.5.2 has my preferred behavior, 7.0.0.4 not.

However, with some tick-tack & testing with other Dutch users, I discovered that to me (on Linux) there is a full difference between the Navigator in docked and in floating state.
The latter does have the behavior that I know from the past.
But since I never use the Navigator in floating state, something did change nevertheless.

> Always feel welcome to add me to any bug you think I may be able to help
> with :-)

:)
Comment 4 Jim Raykowski 2024-09-28 22:20:28 UTC
Ah ha! With F5 Navigator in docked state I bisect the change in behavior to:

commit ada385f1cba427416c1e8517cb6a45b61ceff7b0
Author: Caolán McNamara <caolanm@redhat.com>
Date:   Wed Apr 15 15:34:06 2020 +0100

    navigator pane is grabbing focus away from document when its created
    
    so only grab that focus when its a floating navigator
    
    Change-Id: I52e0840e74c3e8058aee3702df52137dfdd3dc9d
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92279
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm@redhat.com>

 sw/source/uibase/utlui/navipi.cxx | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)