Commit c97cb887 authored by Oriol Brufau's avatar Oriol Brufau Committed by Commit Bot

Don't scroll language list to the top when typing PageDown or PageUp

r708735 made the language list scroll to the very top when typing in it,
to avoid the effect of getting momentarily stuck while scrolling up.

However, this prevented users from scrolling with the PageDown or PageUp
keys. So this patch excludes them.

Fixed: 1064190
Change-Id: Iba3a134444ccae7afa31076666e6cbcc3d932c21
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2121255Reviewed-by: default avatardpapad <dpapad@chromium.org>
Commit-Queue: Oriol Brufau <obrufau@igalia.com>
Cr-Commit-Position: refs/heads/master@{#753432}
parent 5649a2eb
......@@ -166,7 +166,7 @@ Polymer({
// Close dialog if 'esc' is pressed and the search box is already empty.
if (e.key == 'Escape' && !this.$.search.getValue().trim()) {
this.$.dialog.close();
} else {
} else if (e.key != 'PageDown' && e.key != 'PageUp') {
this.$.search.scrollIntoViewIfNeeded();
}
},
......
......@@ -166,7 +166,7 @@ Polymer({
// Close dialog if 'esc' is pressed and the search box is already empty.
if (e.key == 'Escape' && !this.$.search.getValue().trim()) {
this.$.dialog.close();
} else {
} else if (e.key != 'PageDown' && e.key != 'PageUp') {
this.$.search.scrollIntoViewIfNeeded();
}
},
......
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