Skip to content

Commit 67a34e0

Browse files
committed
fix: two line jumps in a row breaking caret positioning
1 parent c7927bc commit 67a34e0

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

frontend/src/ts/utils/caret.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,14 @@ export class Caret {
215215
// making sure to use a separate animation queue so that it doesnt
216216
// affect the position animations
217217
if (this.isMainCaret && options.duration === 0) return;
218+
219+
// in case we have two line jumps in a row
220+
if (this.readyToResetMarginTop) {
221+
$(this.element).css({
222+
marginTop: 0,
223+
});
224+
}
225+
218226
this.readyToResetMarginTop = false;
219227

220228
if (options.duration === 0) {

0 commit comments

Comments
 (0)