GNOME Bugzilla – Bug 542262
Orca should only echo words once when word echo is enabled
Last modified: 2009-03-10 00:05:09 UTC
Note that the following is with using trunk. 1. open firefox and enable word echo only 2. open bugzilla and start filing a new bug. 3. navigate to the summary field 4. type several words. Notice that many of the words typed will be repeated at least two times.
I am seeing something similar in Pidgin too. It's more dramatic in Firefox though, so assigning this to me.
Created attachment 114326 [details] [review] revision 1 It turns out I can reproduce this anywhere as long as I type really fast. This seems to be a side effect of the sentence echo changes. That code assumes that if text was inserted, the caretOffset is at the end which would be perfectly reasonable under normal circumstances. :-) If you type really fast, however, the text-inserted events can get queued up. In other words, by the time we get around to processing the text-inserted event for a character in the word, the space has already been typed. The reason it's more dramatic/noticeable in Firefox is that we get so many events which we have to examine that there's more time for those events to get queued up. What this patch does is look to see if we have a detail1 (which tells us where the caret is at the time of the text insertion event) and uses it to decide what the current character is. Rich, is this change sound?
Adding Mike's name for testing.
Created attachment 114395 [details] [review] revision 2: Make sure the offset at detail1 exists (D'oh!) :-) Will and went over this on the phone. (Thanks Will!) He pointed out that in the case we're trying to handle (i.e. text-changed:insert) events lagging behind due to fast typing, the offset at detail1 might no longer exist. (e.g. because the user selected the text and pressed space). Oops. Good point and (hopefully) addressed in this version.
this patch seems to work nicely. thanks much
Thanks Mike. Patch committed to trunk. Moving to pending.