animated scrolling could leave cursor off screen
This commit is contained in:
parent
156d7c5c8f
commit
1def900834
1 changed files with 8 additions and 6 deletions
|
|
@ -1077,12 +1077,14 @@ var VirtualRenderer = function(container, theme) {
|
||||||
_self.session.setScrollTop(steps.shift());
|
_self.session.setScrollTop(steps.shift());
|
||||||
// trick session to think it's already scrolled to not loose toValue
|
// trick session to think it's already scrolled to not loose toValue
|
||||||
_self.session.$scrollTop = toValue;
|
_self.session.$scrollTop = toValue;
|
||||||
} else {
|
} else if (toValue != null) {
|
||||||
_self.$inScrollAnimation = false;
|
|
||||||
clearInterval(_self.$timer);
|
|
||||||
|
|
||||||
_self.session.$scrollTop = -1;
|
_self.session.$scrollTop = -1;
|
||||||
_self.session.setScrollTop(toValue);
|
_self.session.setScrollTop(toValue);
|
||||||
|
toValue = null;
|
||||||
|
} else {
|
||||||
|
// do this on separate step to not get spurious scroll event from scrollbar
|
||||||
|
_self.$timer = clearInterval(_self.$timer);
|
||||||
|
_self.$inScrollAnimation = false;
|
||||||
callback && callback();
|
callback && callback();
|
||||||
}
|
}
|
||||||
}, 10);
|
}, 10);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue