Chromium Code Reviews
Descriptionautomation_custom_bindings needs to handle blur events too.
In the automation API used by ChromeVox, focus events are
handled specially, because windows tend to fire focus events
due to local focus changes even when they don't have focus
globally - so when we get a focus event we use that as a
signal to compute which node really has focus and fire the
focus event on the proper node if needed.
However, Chrome also fires "blur" events, and when focus is
lost that's the only event that will fire, and it needs to
be handled the same way.
Leaving out "blur" led to a bug where calling
setSequentialFocusNavigationStartingPoint on a node
would cause focus to be lost (correctly), but ChromeVox
wouldn't get the notification that focus was lost
right away with eventFrom=action. So when focus was
checked later, ChromeVox would discover that focus
was suddenly on the root of the document and mistakenly
treat that as a real focus event.
When blur is handled the same way as focus in
automation_custom_bindings, ChromeVox gets the blur event
immediately in response to calling
setSequentialFocusNavigationStartingPoint, and
because eventFrom=action is set, it ignores it
(correctly), and navigation of the page is unaffected.
BUG=662441
TESTED=Manually tested all three repros from bug 662441
Committed: https://crrev.com/5e5850d17ba180e02b1e7bd6d5fb1d3bdb01972e
Cr-Commit-Position: refs/heads/master@{#430368}
Patch Set 1 #Patch Set 2 : Only handle blur events on root #Messages
Total messages: 14 (10 generated)
|