mirror of
https://github.com/outline/outline.git
synced 2026-11-30 17:10:36 +03:00
Pass the textarea element to getComputedStyle
This commit is contained in:
1 parent
7e139ca8f7
commit
c76e75c017
1 file changed
+4
-5
@@ -33,7 +33,7 @@ type Props = {|
|
||||
@observer
|
||||
class DocumentEditor extends React.Component<Props> {
|
||||
@observable activeLinkEvent: ?MouseEvent;
|
||||
@observable ref = React.createRef<HTMLDivElement | HTMLInputElement>();
|
||||
@observable ref = React.createRef<Textarea>();
|
||||
|
||||
focusAtStart = () => {
|
||||
if (this.props.innerRef.current) {
|
||||
@@ -110,8 +110,6 @@ class DocumentEditor extends React.Component<Props> {
|
||||
const normalizedTitle =
|
||||
!title && readOnly ? document.titleWithDefault : title;
|
||||
|
||||
console.log(this.ref.current);
|
||||
|
||||
return (
|
||||
<Flex auto column>
|
||||
{readOnly ? (
|
||||
@@ -145,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
|
||||
}
|
||||
/>
|
||||
|
||||
Reference in new issue
Block a user