Compare commits

...

2 Commits

Author SHA1 Message Date
Saumya Pandey 37fa62d10b Merge branch 'main' of https://github.com/outline/outline into fix/2277 2021-07-06 10:27:44 +05:30
Saumya Pandey c76e75c017 Pass the textarea element to getComputedStyle 2021-07-06 10:20:24 +05:30
+4 -3
View File
@@ -33,7 +33,7 @@ type Props = {|
@observer
class DocumentEditor extends React.Component<Props> {
@observable activeLinkEvent: ?MouseEvent;
ref = React.createRef<HTMLDivElement | HTMLInputElement>();
ref = React.createRef<Textarea>();
focusAtStart = () => {
if (this.props.innerRef.current) {
@@ -143,8 +143,9 @@ class DocumentEditor extends React.Component<Props> {
document={document}
to={documentHistoryUrl(document)}
rtl={
this.ref.current
? window.getComputedStyle(this.ref.current).direction === "rtl"
this.ref.current?.textarea
? window.getComputedStyle(this.ref.current.textarea)
.direction === "rtl"
: false
}
/>