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 731429 - Incorrect text provided by AtkText text-insert signal for GtkEntry
Incorrect text provided by AtkText text-insert signal for GtkEntry
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Accessibility
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2014-06-09 21:10 UTC by Joanmarie Diggs (IRC: joanie)
Modified: 2014-06-09 23:16 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
accessible-event listener (252 bytes, text/x-python)
2014-06-09 21:10 UTC, Joanmarie Diggs (IRC: joanie)
  Details
Adjust position to reflect offset of insertion; not current offset (1.63 KB, patch)
2014-06-09 22:42 UTC, Joanmarie Diggs (IRC: joanie)
committed Details | Review

Description Joanmarie Diggs (IRC: joanie) 2014-06-09 21:10:55 UTC
Created attachment 278164 [details]
accessible-event listener

Steps to reproduce:
1. Launch one of gtk3-demo's Entry demos
2. Launch the attached accessible-event listener in a terminal
3. In the entry type "ab"
4. Press Home to move to the beginning, then type "cd"

Expected results: The newly-inserted character would be provided as the accessible event's any_data (see below for output).

Actual results: Whatever character (if any) is at the insertion point is provided as the accessible event's any_data (see below for output).

Notes: 
1. This is a regression, but I've gone back and it is present in at least 3.8.0. Not sure when it was introduced wrt Gtk+ 3. But it is not present in Gtk+ 2.

2. This issue is not present for GtkTextView; just GtkEntry.

Expected results / Gtk+ 2 results:
==================================
object:text-changed:insert(0, 1, a)
	source: [text | ]
	host_application: [application | gtk-demo]
object:text-changed:insert(1, 1, b)
	source: [text | ]
	host_application: [application | gtk-demo]
object:text-changed:insert(0, 1, c)
	source: [text | ]
	host_application: [application | gtk-demo]
object:text-changed:insert(1, 1, d)
	source: [text | ]
	host_application: [application | gtk-demo]


Actual results / Gtk+ 3 results:
================================
object:text-changed:insert(0, 1, ) <-- "a" missing
	source: [text | ]
	host_application: [application | gtk3-demo]
object:text-changed:insert(1, 1, ) <-- "b" missing
	source: [text | ]
	host_application: [application | gtk3-demo]
object:text-changed:insert(0, 1, a) <-- should be "c"; not "a"
	source: [text | ]
	host_application: [application | gtk3-demo]
object:text-changed:insert(1, 1, a) <-- should be "d"; not "a"
	source: [text | ]
	host_application: [application | gtk3-demo]
Comment 1 Joanmarie Diggs (IRC: joanie) 2014-06-09 22:42:14 UTC
Created attachment 278168 [details] [review]
Adjust position to reflect offset of insertion; not current offset

After a quick chat with Benjamin, I took a look at what happens for GtkTextViewAccessible. Doing the same thing for GtkEntryAccessible appears to solve the problem.
Comment 2 Benjamin Otte (Company) 2014-06-09 23:16:26 UTC
I pushed the fix to master and the gtk-3-12 branch.