Skip to content

Commit

Permalink
Fix setting caret bidi level on Firefox
Browse files Browse the repository at this point in the history
  • Loading branch information
marijnh committed Sep 11, 2023
1 parent d167946 commit 6434180
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/docview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -264,8 +264,8 @@ export class DocView extends ContentView {
}
}
rawSel.collapse(anchor.node, anchor.offset)
if (main.bidiLevel != null && (domSel as any).caretBidiLevel != null)
(domSel as any).caretBidiLevel = main.bidiLevel
if (main.bidiLevel != null && (rawSel as any).caretBidiLevel !== undefined)
(rawSel as any).caretBidiLevel = main.bidiLevel
} else if (rawSel.extend) {
// Selection.extend can be used to create an 'inverted' selection
// (one where the focus is before the anchor), but not all
Expand Down

0 comments on commit 6434180

Please sign in to comment.