From 162da9a3ad69c9ae0e32a29f0788d7d743497a8f Mon Sep 17 00:00:00 2001 From: Tom Moor Date: Thu, 16 Sep 2021 22:47:58 -0700 Subject: [PATCH] fix: Can't edit title in collaborative mode --- app/scenes/Document/components/Document.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/app/scenes/Document/components/Document.js b/app/scenes/Document/components/Document.js index 6533d925..15291927 100644 --- a/app/scenes/Document/components/Document.js +++ b/app/scenes/Document/components/Document.js @@ -92,11 +92,19 @@ class DocumentScene extends React.Component { if (this.props.readOnly || auth.team?.collaborativeEditing) { this.lastRevision = document.revision; + } + if (this.props.readOnly) { if (document.title !== this.title) { this.title = document.title; } - } else if (prevProps.document.revision !== this.lastRevision) { + } + + if ( + !this.props.readOnly && + !auth.team?.collaborativeEditing && + prevProps.document.revision !== this.lastRevision + ) { if (auth.user && document.updatedBy.id !== auth.user.id) { this.props.toasts.showToast( t(`Document updated by {{userName}}`, {