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 520395 - [a11y] event.any_data incorrect with spin buttons and combo boxes with an "object:text-changed:insert" event if text is selected.
[a11y] event.any_data incorrect with spin buttons and combo boxes with an "ob...
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Accessibility
2.12.x
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2008-03-04 22:15 UTC by Rich Burridge
Modified: 2009-02-26 02:29 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch (1.76 KB, patch)
2009-02-19 09:10 UTC, Li Yuan
none Details | Review
patch (1.76 KB, patch)
2009-02-19 09:12 UTC, Li Yuan
committed Details | Review

Description Rich Burridge 2008-03-04 22:15:34 UTC
This bug is blocking Orca bug #519559:
Orca gtk-demo/role_spin_button.py regression test #4 produces the wrong results.

Steps to reproduce.

1/ Start Orca
2/ Start gtk-demo and start the Color selector example.
3/ Click on the "Change the above color" button to bring up the
   color selector.
4/ Tab until focus is on the Hue: spin button (which initially has a
   value of 240 and the text is selected).
5/ Press Down arrow once.

Orca gets sent an "object:text-changed:insert" event. As it currently
stands, we use the event.any_data field to get the value of the text
associated with this spin button to try to speak the current text value. 
That value is incorrect -- still the old value of 240 -- if the text is
selected. If we unselect that text and press Down arrow again, the
event.any_data has the correct (new value) of the spin button text.
Comment 1 Joanmarie Diggs (IRC: joanie) 2008-03-04 23:37:41 UTC
It seems this is also a problem with editable combo boxes.

1. In gtk-demo, bring up the combo boxes demo
2. In the editable portion of the third combo box, type "foo"
3. Select the text and press down arrow to select "One"

Expected results:

* An object:text-changed:delete event with any_data of "foo"
* An object:text-changed:insert event with any_data of "One"

Actual results:

We get the above events, but in both cases the any_data is "foo" (thus AT's think "foo" is showing when it's not).

4. Retype foo
5. DON'T select the text, and press down arrow to select "One"

Expected results and actual results:

* An object:text-changed:delete event with any_data of "foo"
* An object:text-changed:insert event with any_data of "One"
Comment 2 Li Yuan 2009-02-19 03:37:00 UTC
gail gets the text from gtk_text_buffer_get_iter_at_offset, a gtk+ bug?
Comment 3 Matthias Clasen 2009-02-19 04:32:48 UTC
Not sure I understand. there are no text buffers involved in combo boxes or spin buttons. It is all entries...
Comment 4 Li Yuan 2009-02-19 08:22:14 UTC
Oh, my fault. gailtextutil maintains the buffer.
Comment 5 Li Yuan 2009-02-19 09:10:47 UTC
Created attachment 129046 [details] [review]
patch
Comment 6 Li Yuan 2009-02-19 09:12:08 UTC
Created attachment 129047 [details] [review]
patch