Skip to content

Commit 53d3317

Browse files
committed
fixed caret animating even if set to off
1 parent 2de8317 commit 53d3317

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

public/js/script.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -357,11 +357,10 @@ function updateCaretPosition() {
357357

358358
if (config.smoothCaret) {
359359
duration = 100;
360-
}
361-
362-
if (Math.round(caret.position().top) != Math.round(newTop)) {
363-
caret.css("top", newTop);
364-
duration = 10;
360+
if (Math.round(caret.position().top) != Math.round(newTop)) {
361+
caret.css("top", newTop);
362+
duration = 10;
363+
}
365364
}
366365

367366
caret.stop(true, true).animate({

0 commit comments

Comments
 (0)