After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 372777 - Wrong, out of order accessibility text events
Wrong, out of order accessibility text events
Status: RESOLVED FIXED
Product: vte
Classification: Core
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Chris Wilson
VTE Maintainers
: 338014 (view as bug list)
Depends on:
Blocks: 398006
 
 
Reported: 2006-11-09 02:11 UTC by Peter Parente
Modified: 2015-02-27 11:38 UTC
See Also:
GNOME target: ---
GNOME version: 2.15/2.16


Attachments
Pyatspi script to watch for caret-moved and text-changed events. (349 bytes, text/x-python)
2015-01-25 18:31 UTC, Egmont Koblinger
  Details
Fix (3.42 KB, patch)
2015-01-25 21:16 UTC, Egmont Koblinger
committed Details | Review

Description Peter Parente 2006-11-09 02:11:27 UTC
The order of caret movement and text insertion/deletion events for gnome-terminal differs from all other gtk text widgets. The normal event orderings are the following:

Insertion
1) insert
2) move

Deletion
1) delete (delete key)
or
1) delete (backspace key)
2) move

In the current version of gnome-terminal, the event ordering is the following:

Insertion
1) move (to the location one past the last character in the text to be inserted)
2) delete (all text to be inserted before it's inserted)
3) insert (the text to be inserted)

Deletion
1) delete (delete key)
2) insert
or
1) move
2) delete (backspace key)
3) insert
 
The fact that insert AND delete events are always fired whether text was actually inserted or deleted is confusing for ATs. Furthermore, putting the move event before the insertion/deletion makes it difficult for an AT to determine whether the movement was due to text insertion/deletion or navigation without insertion/deletion. 

The problem is that the AT has to "predict" whether an insert/delete will follow a move before it can tell the user what has actually happened. This requires hacks like knowing what key has been pressed to cause the event (which discounts programmatic movement, insertion, deletion, mouse clicks, etc.) The standard gtk event ordering mitigates this problem by first letting the AT know what is causing the movement.
Comment 1 Chris Wilson 2007-01-26 10:20:57 UTC
*** Bug 338014 has been marked as a duplicate of this bug. ***
Comment 2 Egmont Koblinger 2015-01-25 18:31:43 UTC
Created attachment 295392 [details]
Pyatspi script to watch for caret-moved and text-changed events.

Based on the script from bug 166637 comment 24.

Cmdline script to debug these events in a running gnome-terminal/vte.  This script should be ran in a non-gnome terminal so that it doesn't reports events occurring in its own terminal.

Debugging with accerciser (as described in bug 338014, s/at-poke/accerciser/) causes it to hang for me (becomes unresponsible).
Comment 3 Egmont Koblinger 2015-01-25 21:16:32 UTC
Created attachment 295394 [details] [review]
Fix

Could you guys please test this patch?
Comment 4 Egmont Koblinger 2015-02-27 11:38:19 UTC
Committed the patch - please reopen or file a new bug if there are still problems.