Commit 9b1c2175 authored by Kristi Park's avatar Kristi Park Committed by Commit Bot

[NTP] Fix arrow key navigation when shortcut option is clicked

Explicitly remove using-mouse-nav. The keydown event was prevented from
propagating to the listener that removed the mouse navigation class.

Bug: 1005712
Change-Id: I30b8d9c025cf5f56805134eefd6918892c19ec62
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1825729Reviewed-by: default avatarKyle Milka <kmilka@chromium.org>
Commit-Queue: Kristi Park <kristipark@chromium.org>
Cr-Commit-Position: refs/heads/master@{#700023}
parent fffea80f
......@@ -2039,6 +2039,7 @@ customize.initCustomBackgrounds = function(showErrorNotification) {
// Handle arrow key navigation.
event.preventDefault();
event.stopPropagation();
richerPicker.classList.remove(customize.CLASSES.MOUSE_NAV);
if (event.keyCode === forwardArrowKey) {
mvOption.focus();
} else if (event.keyCode === customize.KEYCODES.DOWN) {
......@@ -2067,6 +2068,7 @@ customize.initCustomBackgrounds = function(showErrorNotification) {
// Handle arrow key navigation.
event.preventDefault();
event.stopPropagation();
richerPicker.classList.remove(customize.CLASSES.MOUSE_NAV);
if (event.keyCode === backArrowKey) {
clOption.focus();
} else if (
......@@ -2093,6 +2095,7 @@ customize.initCustomBackgrounds = function(showErrorNotification) {
// Handle arrow key navigation.
event.preventDefault();
event.stopPropagation();
richerPicker.classList.remove(customize.CLASSES.MOUSE_NAV);
if (event.keyCode === backArrowKey ||
event.keyCode === customize.KEYCODES.UP) {
mvOption.focus();
......
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