mirror of
https://github.com/ankitects/anki.git
synced 2025-09-25 01:06:35 -04:00
Merge pull request #1057 from abdnh/fix-editor-rtl-check
Fix editor RTL check
This commit is contained in:
commit
57100317e5
1 changed files with 3 additions and 1 deletions
|
@ -189,7 +189,9 @@ export class EditingArea extends HTMLDivElement {
|
|||
}
|
||||
|
||||
isRightToLeft(): boolean {
|
||||
return this.editable.style.direction === "rtl";
|
||||
const styleSheet = this.baseStyle.sheet as CSSStyleSheet;
|
||||
const firstRule = styleSheet.cssRules[0] as CSSStyleRule;
|
||||
return firstRule.style.direction === "rtl";
|
||||
}
|
||||
|
||||
getSelection(): Selection {
|
||||
|
|
Loading…
Reference in a new issue