Fix editor RTL check

This commit is contained in:
abdo 2021-03-07 18:12:42 +03:00
parent 312fa27898
commit 79dcfc84be

View File

@ -189,7 +189,9 @@ export class EditingArea extends HTMLDivElement {
} }
isRightToLeft(): boolean { 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 { getSelection(): Selection {