mirror of
https://github.com/Microsoft/vscode
synced 2024-10-02 17:32:41 +00:00
larger threshold for trackpad variability (#209674)
This commit is contained in:
parent
5edc703773
commit
235d4d104b
|
@ -587,14 +587,14 @@ async function webviewPreloads(ctx: PreloadContext) {
|
|||
}
|
||||
|
||||
if (node.hasAttribute('recentlyScrolled')) {
|
||||
if (lastTimeScrolled && Date.now() - lastTimeScrolled > 300) {
|
||||
if (lastTimeScrolled && Date.now() - lastTimeScrolled > 400) {
|
||||
// it has been a while since we actually scrolled
|
||||
// if scroll velocity increases, it's likely a new scroll event
|
||||
if (!!previousDelta && deltaY < 0 && deltaY < previousDelta - 2) {
|
||||
// if scroll velocity increases significantly, it's likely a new scroll event
|
||||
if (!!previousDelta && deltaY < 0 && deltaY < previousDelta - 8) {
|
||||
clearTimeout(scrollTimeout);
|
||||
scrolledElement?.removeAttribute('recentlyScrolled');
|
||||
return false;
|
||||
} else if (!!previousDelta && deltaY > 0 && deltaY > previousDelta + 2) {
|
||||
} else if (!!previousDelta && deltaY > 0 && deltaY > previousDelta + 8) {
|
||||
clearTimeout(scrollTimeout);
|
||||
scrolledElement?.removeAttribute('recentlyScrolled');
|
||||
return false;
|
||||
|
|
Loading…
Reference in a new issue