fix: Unintended scroll reset when switching between view / edit (#1807)
* fix: Don't remount document when switching between edit/read-only fix: Button vertical alignment when using as=Link * fix: Bump RME, fixes issue with image behavior changing between read-only/edit without editor remount * fix: Heading anchor positioning
This commit is contained in:
@@ -81,13 +81,13 @@ class DocumentScene extends React.Component<Props> {
|
||||
@observable title: string = this.props.document.title;
|
||||
getEditorText: () => string = () => this.props.document.text;
|
||||
|
||||
componentDidMount() {
|
||||
this.updateIsDirty();
|
||||
}
|
||||
|
||||
componentDidUpdate(prevProps) {
|
||||
const { auth, document } = this.props;
|
||||
|
||||
if (prevProps.readOnly && !this.props.readOnly) {
|
||||
this.updateIsDirty();
|
||||
}
|
||||
|
||||
if (this.props.readOnly) {
|
||||
this.lastRevision = document.revision;
|
||||
|
||||
@@ -440,7 +440,7 @@ class DocumentScene extends React.Component<Props> {
|
||||
ui={this.props.ui}
|
||||
/>
|
||||
</Flex>
|
||||
{readOnly && !isShare && !revision && (
|
||||
{!isShare && !revision && (
|
||||
<>
|
||||
<MarkAsViewed document={document} />
|
||||
<ReferencesWrapper isOnlyTitle={document.isOnlyTitle}>
|
||||
|
||||
Reference in New Issue
Block a user