Commit a841518e authored by Katie D's avatar Katie D Committed by Commit Bot

Fix crash on disabling Select-to-Speak.

Actually remove the Select-to-Speak event handler instead of
trying to add it a second time.

TBR=dmazzoni@chromium.org

Change-Id: Ie8a8dd15adfa16e58ef8d46c60ba3f9b3471b0e6
Reviewed-on: https://chromium-review.googlesource.com/993473Reviewed-by: default avatarKatie Dektar <katie@chromium.org>
Commit-Queue: Katie Dektar <katie@chromium.org>
Cr-Commit-Position: refs/heads/master@{#547808}
parent 8337a57a
......@@ -59,8 +59,7 @@ SelectToSpeakEventHandler::SelectToSpeakEventHandler() {
SelectToSpeakEventHandler::~SelectToSpeakEventHandler() {
if (aura::Env::GetInstanceDontCreate())
aura::Env::GetInstanceDontCreate()->AddPreTargetHandler(
this, ui::EventTarget::Priority::kAccessibility);
aura::Env::GetInstanceDontCreate()->RemovePreTargetHandler(this);
}
void SelectToSpeakEventHandler::CaptureForwardedEventsForTesting(
......
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