Bug 94113 - Accessible focus event missing when caret moves to start of paragraph spanning two pages (see comment 11)
Summary: Accessible focus event missing when caret moves to start of paragraph spannin...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
5.2.0.4 release
Hardware: Other All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: accessibility, bibisectRequest, regression
Depends on:
Blocks: a11y-Linux
  Show dependency treegraph
 
Reported: 2015-09-10 22:14 UTC by Joanmarie Diggs
Modified: 2023-05-11 09:20 UTC (History)
8 users (show)

See Also:
Crash report or crash signature:


Attachments
test case (8.91 KB, application/vnd.oasis.opendocument.text)
2015-09-10 22:14 UTC, Joanmarie Diggs
Details
accessible-event listener (paragraph.py) (1.04 KB, text/x-python)
2015-09-10 22:15 UTC, Joanmarie Diggs
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Joanmarie Diggs 2015-09-10 22:14:56 UTC
Created attachment 118588 [details]
test case

Steps to reproduce:
1. Open the attached test case in Writer
2. Launch the attached pyatspi accessible-event listener in a terminal
3. Position the caret in the middle of the last line on the first page
4. Down arrow once then up arrow
5. Position the caret at the start of the last line on the first page
6. Down arrow once then up arrow

Expected results: Each time the caret moves into the paragraph on the other page, that paragraph would emit both an object:state-changed:focused event and a caret moved event.

Actual results: The expected results *unless* the caret has moved from the start of the paragraph on page 2 to the start of the paragraph on page 1. In that instance, only the caret-moved event is received.

Annotated output from performing the steps above:

==============
# Step 3: Position caret in middle of last line on first page
18:09:32 - [paragraph | ] with index in parent 11 - is focused.
18:09:32 - [paragraph | ] with index in parent 11 - caret moved to offset 14.

# Step 4: Down arrow and up arrow
18:09:35 - [paragraph | ] with index in parent 12 - is focused.
18:09:35 - [paragraph | ] with index in parent 12 - caret moved to offset 14.
18:09:38 - [paragraph | ] with index in parent 11 - is focused.
18:09:38 - [paragraph | ] with index in parent 11 - caret moved to offset 14.

# Step 5: Position caret at start of last line on first page
18:09:45 - [paragraph | ] with index in parent 11 - caret moved to offset 0.

# Step 6: Down arrow and up arrow
18:09:47 - [paragraph | ] with index in parent 11 - caret moved to offset 70.
18:09:47 - [paragraph | ] with index in parent 12 - is focused.
18:09:47 - [paragraph | ] with index in parent 12 - caret moved to offset 0.
18:09:52 - [paragraph | ] with index in parent 11 - caret moved to offset 0.
==============
Comment 1 Joanmarie Diggs 2015-09-10 22:15:36 UTC
Created attachment 118590 [details]
accessible-event listener (paragraph.py)
Comment 2 Buovjaga 2016-05-06 10:17:35 UTC
Reproduced.

Arch Linux 64-bit, KDE Plasma 5
Version: 5.2.0.0.alpha1+
Build ID: 540fee2dc7553152914f7f1d8a41921e765087ef
CPU Threads: 8; OS Version: Linux 4.5; UI Render: default; 
Locale: fi-FI (fi_FI.UTF-8)
Built on April 30th 2016
Comment 3 QA Administrators 2017-05-22 13:38:57 UTC Comment hidden (obsolete)
Comment 4 Alex ARNAUD 2017-05-30 16:15:32 UTC
Dear all,

I'm not sure to do the right thing but I'm not able to reproduce.

Best regards.
Comment 5 Alex ARNAUD 2017-08-01 13:36:06 UTC
Dear all,

I can reproduce on LibreOffice 5.4 GTK3 but not on LibreOffice 4.2.6.

Add the regression keyword.


When I press down arrow from the beginning of the last line of the page to the first line of the second page I observe that LibreOffice emits too much events.

15:31:33 - [paragraph | ] with index in parent 21 - is focused.
15:31:34 - [paragraph | ] with index in parent 21 - caret moved to offset 70.
15:31:34 - [paragraph | ] with index in parent 22 - is focused.
15:31:34 - [paragraph | ] with index in parent 22 - caret moved to offset 0.
15:31:36 - [paragraph | ] with index in parent 22 - is focused.

The user consequence: Orca announces the previous and current line when the user switch between page one and page two.

Best regards.
Comment 6 QA Administrators 2018-10-02 02:55:36 UTC Comment hidden (obsolete)
Comment 7 Frans-Willem Post 2018-11-28 15:32:04 UTC
I am not sure if I have reproduced the issue or not; I do not quite understand it. Sorry. Here are my specs and output of the listener:

Version: 6.1.2.1
Build ID: 1:6.1.2-0ubuntu1.1
CPU threads: 4; OS: Linux 4.18; UI render: default; VCL: gtk3; 
Locale: nl-NL (en_US.UTF-8); Calc: group threaded

16:26:43 - [panel | ] with index in parent 1 - is focused.
16:26:43 - [paragraph | ] with index in parent 0 - is focused.
16:26:46 - [paragraph | ] with index in parent 26 - is focused.
16:26:46 - [paragraph | ] with index in parent 26 - caret moved to offset 31.
16:26:46 - [paragraph | ] with index in parent 26 - is focused.
16:26:46 - [paragraph | ] with index in parent 26 - caret moved to offset 31.
16:26:47 - [paragraph | ] with index in parent 27 - is focused.
16:26:47 - [paragraph | ] with index in parent 27 - caret moved to offset 31.
16:26:48 - [paragraph | ] with index in parent 26 - is focused.
16:26:48 - [paragraph | ] with index in parent 26 - caret moved to offset 31.
16:27:42 - [paragraph | ] with index in parent 26 - is focused.
16:27:46 - [paragraph | ] with index in parent 26 - caret moved to offset 0.
16:27:47 - [paragraph | ] with index in parent 26 - caret moved to offset 70.
16:27:47 - [paragraph | ] with index in parent 27 - is focused.
16:27:47 - [paragraph | ] with index in parent 27 - caret moved to offset 0.
Comment 8 Alex ARNAUD 2019-02-16 16:12:26 UTC
@Xisco: This bug description is outdated, there is always a mistake when a paragraph on two pages but it's not the same bug, see comment #5. Do we need to open a new update or is it possible to update the description ?

Best regards,
Alex.
Comment 9 Xisco Faulí 2019-03-12 11:17:53 UTC
(In reply to Alex ARNAUD from comment #8)
> @Xisco: This bug description is outdated, there is always a mistake when a
> paragraph on two pages but it's not the same bug, see comment #5. Do we need
> to open a new update or is it possible to update the description ?
> 
> Best regards,
> Alex.

Hello Alex,
So this issue is not reproducible but a different one is ? Then I would close this one as RESOLVED WORKSFORME and open a new one...
Comment 10 Alex ARNAUD 2019-03-13 10:46:44 UTC
(In reply to Alex ARNAUD from comment #8)
> @Xisco: This bug description is outdated, there is always a mistake when a
> paragraph on two pages but it's not the same bug, see comment #5. Do we need
> to open a new update or is it possible to update the description ?
> 
> Best regards,
> Alex.

I agree with you.

@am_dxer, patrick, peter: could you please help us on this ? I don't have the needed time for this and I need your help.

Best regards,
Alex.
Comment 11 Peter Vágner 2019-03-20 12:47:03 UTC
Hello,

In order to help to reproduce this issue here are my revised steps.
* Open the attached test case in LO Writer.
* Look for line starting with "This is page 1" and verify if this is really the last line of a page. For some reason I had to delete an empty paragraph at the top in order to fix the test document.
* Now position the caret at the begining of that line.
* Start attached listener in a terminal and notice it has printed no output so far.
* Move back to the LO window and press ctrl+right to jump right a word.
* Now move to the terminal window and notice you can identify caret moved event
* If identifying new output in a terminal window is difficult for you exit the listener by pressing ctrl+c and run it again.
* Move to the LO window and press down, then up arrow key.
* Go back to the terminal window and make sure you can identify both the caret moved events in the listener's output and you can also identify how LO reports you have moved into another paragraph during that move i.e. object:state-changed:focused event.
* Now I believe you have understood what are we testing here so repeat it at the start of a line.
* Compare your output with annotated output provided by @Joanmarie as a part of the bug description.

My result:
The issue is still present because when moving at the begining of a line object:state-changed:focused event is missing.
If you are still unsure please do reread Joanies report until you can understand this better or ask again we can discuss it further if you need it.

@Alex I can also reproduce what you are describing in comment 5 but I agree that's a different issue.

So if we will end up creating another issue both of them are still reproducible and need fixing.

My version string:
Version: 6.2.1.2
Build ID: 6.2.1-1
CPU threads: 8; OS: Linux 5.0; UI render: default; VCL: gtk3; 
Locale: en-US (en); UI-Language: en-US
Calc: threaded
Comment 12 QA Administrators 2023-03-23 03:24:05 UTC Comment hidden (obsolete)
Comment 13 Peter Vágner 2023-05-11 09:20:33 UTC
Hello,
I can still reproduce this as explained in comment 11 with libreoffice 7.5.2. I am unable to copy the version of string from the Help -> About because of the different issue.