GNOME Bugzilla – Bug 520395
[a11y] event.any_data incorrect with spin buttons and combo boxes with an "object:text-changed:insert" event if text is selected.
Last modified: 2009-02-26 02:29:39 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.
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"
gail gets the text from gtk_text_buffer_get_iter_at_offset, a gtk+ bug?
Not sure I understand. there are no text buffers involved in combo boxes or spin buttons. It is all entries...
Oh, my fault. gailtextutil maintains the buffer.
Created attachment 129046 [details] [review] patch
Created attachment 129047 [details] [review] patch