Skip to content

Commit

Permalink
Merge pull request #7001 from getkirby/v5/fix/6959-writer-update-issue
Browse files Browse the repository at this point in the history
Fix writer update issue
  • Loading branch information
bastianallgeier authored Feb 13, 2025
2 parents c2ea031 + 9f64171 commit 8378beb
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions panel/src/components/Forms/Writer/Editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,11 @@ export default class Editor extends Emitter {

// Only emit an update if the doc has changed and
// an update has not been actively prevented
if (transaction.docChanged || !transaction.getMeta("preventUpdate")) {
if (
transaction.docChanged &&
!transaction.getMeta("preventUpdate") &&
transaction.steps.length > 0
) {
this.emit("update", payload);
}

Expand Down Expand Up @@ -396,7 +400,7 @@ export default class Editor extends Emitter {
// give extensions access to our view
this.extensions.view = this.view;

this.setContent(this.options.content, true);
this.setContent(this.options.content);
}

insertText(text, selected = false) {
Expand Down

0 comments on commit 8378beb

Please sign in to comment.