Commit 7b1e5a15 authored by David Tseng's avatar David Tseng Committed by Commit Bot

Ignore focus events generated by Switch Access focus actions

When SA calls someAutomationNode.focus(), it may generate focus events on someAutomationNode later. This isn't always desirable, e.g. when the node is a text field and SA wants to remain on the VK.

Correct this by ignoring focus events of this type i.e. these events have eventFrom 'action'.

R=anastasi@google.com

Fixed: 1113669
AX-Relnotes: n/a
Change-Id: I2266f0aced57db1949dfad2793cc58ac2be923eb
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2352613
Commit-Queue: David Tseng <dtseng@chromium.org>
Reviewed-by: default avatarAnastasia Helfinstein <anastasi@google.com>
Cr-Commit-Position: refs/heads/master@{#797836}
parent ae606e48
......@@ -288,6 +288,11 @@ class NavigationManager {
* @private
*/
onFocusChange_(event) {
// Ignore focus changes from our own actions.
if (event.eventFrom == 'action') {
return;
}
if (this.node_.isEquivalentTo(event.target)) {
return;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment