Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix AutoSave on initial change in feedback #340

Merged
merged 1 commit into from
Apr 18, 2024
Merged

Conversation

allanbenelli
Copy link
Contributor

Fixes #320

@@ -80,14 +80,21 @@ export default {
},
onCreate: ({ editor }) => {
let creating = true
// Ensure editor is fully loaded before setting creating to false
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ich habe noch eine andere Lösung gefunden: Wir könnten die ganze onCreate Methode durch folgende ersetzen.

      onUpdate: ({ editor, transaction }) => {
        if (JSON.stringify(this.currentValue) === JSON.stringify(editor.getJSON())) return
        this.currentValue = editor.getJSON()
        this.$emit('input', this.currentValue)
        if (!this.isRemoteChange(transaction)) {
          this.$emit('localinput', this.currentValue)
        }
      },

Wäre vom Code her schöner. Aber deine Lösung ist etwas safer, da ich nicht zu 100% sicher bin ob meine Variante bei Kollaboration irgendwas kaputt macht.

@carlobeltrame carlobeltrame merged commit 09cfdce into master Apr 18, 2024
18 checks passed
@carlobeltrame carlobeltrame deleted the fix-autosave-bug branch April 18, 2024 16:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Erste Änderung an Anforderungs-Status im Rückmelde-Formular autosaved nicht
2 participants