Commit 4b5321f2 authored by dtseng's avatar dtseng Committed by Commit bot

Invalidate the text edit handler on selection events

This is necessary to make braille output work in menus. If a text edit handler is active, output gets delegated through that handler, skipping the output o f the current range.

BUG=657036
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation

Review-Url: https://codereview.chromium.org/2442583002
Cr-Commit-Position: refs/heads/master@{#427107}
parent 2ff29563
......@@ -428,6 +428,11 @@ DesktopAutomationHandler.prototype = {
* @param {!AutomationEvent} evt
*/
onSelection: function(evt) {
// Invalidate any previous editable text handler state since some nodes,
// like menuitems, can receive selection while focus remains on an editable
// leading to braille output routing to the editable.
this.textEditHandler_ = null;
chrome.automation.getFocus(function(focus) {
// Desktop tabs get "selection" when there's a focused webview during tab
// switching.
......
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