Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion web/packages/shared/components/TextEditor/TextEditor.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,9 @@ class TextEditor extends Component {

// If the data changes, reset the value in each session so changes are
// rendered.
if (prevProps.data !== this.props.data) {
// Only update the content if the editor is read-only to prevent
// interrupting the editing experience.
if (this.props.readOnly && prevProps.data !== this.props.data) {
this.props.data.forEach((doc, i) => {
this.sessions[i].setValue(doc.content);
});
Expand Down
Loading