Commit b58b675b authored by Kyle Milka's avatar Kyle Milka Committed by Commit Bot

[NTP] Prevent autoscroll when down arrow is pressed on bg menu

Bug: 996098
Change-Id: Ia7486e26c3225ff40a8fb9af36520788db0b58e9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1763342Reviewed-by: default avatarGayane Petrosyan <gayane@chromium.org>
Commit-Queue: Kyle Milka <kmilka@chromium.org>
Cr-Commit-Position: refs/heads/master@{#689186}
parent 2759b6b1
......@@ -1923,12 +1923,14 @@ customize.initCustomBackgrounds = function(showErrorNotification) {
$(customize.IDS.BACKGROUNDS_MENU).onkeydown = function(event) {
if (customize.arrowKeys.includes(event.keyCode)) {
event.preventDefault();
$(customize.IDS.BACKGROUNDS_UPLOAD_ICON).focus();
}
};
$(customize.IDS.BACKGROUNDS_IMAGE_MENU).onkeydown = function(event) {
if (customize.arrowKeys.includes(event.keyCode)) {
event.preventDefault();
document.querySelector('[id$="img_tile_0"]').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