FIX: J/K navigation resets current selection when scrolling fast.
Sometimes, when keeping J or K pressed and scrolling fast, the current selection would go out of the viewport for a few moments and the algorithm would try selecting the "best" element that is in viewport. This bug is reproducible only on certain machines. For example, Linux machines seem to be passing key events faster to the browser.
This commit is contained in:
parent
936d4ce17a
commit
df6630f868
|
@ -441,7 +441,7 @@ export default {
|
|||
|
||||
// Discard selection if it is not in viewport, so users can combine
|
||||
// keyboard shortcuts with mouse scrolling.
|
||||
if ($selected.length !== 0) {
|
||||
if ($selected.length !== 0 && !fast) {
|
||||
const offset = minimumOffset();
|
||||
const beginScreen = $(window).scrollTop() - offset;
|
||||
const endScreen = beginScreen + window.innerHeight + offset;
|
||||
|
|
Loading…
Reference in New Issue