Bug 112932 - Pressing enter in read-only Table of Content doesnt jump to heading
Summary: Pressing enter in read-only Table of Content doesnt jump to heading
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard: target:25.2.0
Keywords: accessibility
Depends on:
Blocks: TableofContents-Indexes Shortcuts-Accelerators
  Show dependency treegraph
 
Reported: 2017-10-06 09:57 UTC by Alex ARNAUD
Modified: 2024-08-12 16:01 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments
demo of UNO command to simulate mouse button click at cursor position (875.33 KB, video/x-matroska)
2024-08-05 00:15 UTC, Jim Raykowski
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alex ARNAUD 2017-10-06 09:57:58 UTC
Description:
Dear all,

I've discovered last week that in read-only documents pressing "enter" on a table of content link jump the cursor to the target.
It could be really useful for keyboard-only user to able to do that to in normal document if the if the table of contents is "protected against manual changes"

Steps to Reproduce:
1. Open a document with a table of contents
2. Move your cursor on a link inside the table of contents
3. Pressing the return key

Actual Results:  
Nothing happened

Expected Results:
The same behavior has it is when you open the document in read-only mode.


Reproducible: Always

User Profile Reset: No

Additional Info:
Best regards.


User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0
Comment 1 Yousuf Philips (jay) (retired) 2017-10-06 16:28:32 UTC
So with 'Select Text' enabled in the context menu when in read-only mode, the cursor does appear and pressing enter on a ToC entry will jump to its location, just like clicking the entry with a mouse does, which in edit mode requires ctrl+click.

Not sure that pressing enter alone in edit mode should work like that but yes a combination shortcut key using enter, would be a useful thing to have.
Comment 2 Alex ARNAUD 2017-10-06 17:11:16 UTC
(In reply to Yousuf Philips (jay) from comment #1)
> Not sure that pressing enter alone in edit mode should work like that but
> yes a combination shortcut key using enter, would be a useful thing to have.

For me it's not a problem to affect the enter key to activate an item in the Table of Contents because for the moment enter key doesn't nothing on this context.

Best regards.
Comment 3 Heiko Tietze 2017-10-07 06:42:01 UTC
Jump to the heading on just enter sounds okay to me. We use ctrl+click so ctrl+enter make sense as well. Would prefer the simpler variant as this change aims to improve a11y.
Comment 4 Alex ARNAUD 2017-10-07 13:07:34 UTC
(In reply to Heiko Tietze from comment #3)
> Jump to the heading on just enter sounds okay to me. We use ctrl+click so
> ctrl+enter make sense as well. Would prefer the simpler variant as this
> change aims to improve a11y.

I'm OK for ctrl+enter, it is convenient with the mouse behavior.

Best regards.
Comment 5 Terrence Enger 2017-10-09 15:35:03 UTC
I am changing the "depends-on" relationship to blocks for the two bugs.

alexarnaud, phillipz85,
Is the relationship not supposed to be this way around?
Comment 6 Alex ARNAUD 2017-10-09 15:50:57 UTC
(In reply to Terrence Enger from comment #5)
> I am changing the "depends-on" relationship to blocks for the two bugs.
> 
> alexarnaud, phillipz85,
> Is the relationship not supposed to be this way around?

You're correct. It's my mistake.

Best regards.
Comment 7 Jim Raykowski 2024-08-05 00:15:54 UTC
Created attachment 195702 [details]
demo of UNO command to simulate mouse button click at cursor position

Hi all,

Here's a WIP demo of an UNO command that simulates a ctrl-left mouse button click at the current cursor position. I used F12 for the UNO command keyboard short-cut key. The patch done for enhancement bug 161717 can also use this and perhaps other objects that do some action when a mouse button is clicked on it.
Comment 8 Jim Raykowski 2024-08-06 16:22:56 UTC
Proposed patch:
https://gerrit.libreoffice.org/c/core/+/171554

Also allows to jump to footnotes/endnotes and hyperlinks when the cursor is positioned on them.
Comment 9 Jim Raykowski 2024-08-08 02:45:18 UTC
PS2 of the above mentioned patch simply allows the jump to happen when a table of content has "Protect against manual changes" checked in the 'Table of Contents, Index, or Bibliography' dialog 'Type' tab or 'Read-only' is checked in the Navigator Indexes context menu for the table of content.
Comment 10 Commit Notification 2024-08-12 16:00:00 UTC
Jim Raykowski committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/4437f5874203298715157cd858caf8cf7992342b

Resolves: tdf#112932 Pressing enter in read-ony Table of Content

It will be available in 25.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:
https://wiki.documentfoundation.org/Testing_Daily_Builds

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