fixed caret animating even if set to off

This commit is contained in:
Jack 2020-05-27 22:02:50 +01:00
parent 2de831788d
commit 53d33176e3

View file

@ -357,11 +357,10 @@ function updateCaretPosition() {
if (config.smoothCaret) {
duration = 100;
}
if (Math.round(caret.position().top) != Math.round(newTop)) {
caret.css("top", newTop);
duration = 10;
if (Math.round(caret.position().top) != Math.round(newTop)) {
caret.css("top", newTop);
duration = 10;
}
}
caret.stop(true, true).animate({