Skip to content

Commit

Permalink
fix xml editor
Browse files Browse the repository at this point in the history
  • Loading branch information
longhotsummer committed Dec 6, 2024
1 parent c326192 commit 8974336
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion indigo_app/static/javascript/indigo/views/document_editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@
editXmlElement: function(element) {
this.editingXmlElement = element;
this.aknTextEditor.setXmlElement(element);
this.xmlEditor.setXmlElement(element);
this.editing = true;

// if we're not already editing, activate the editor
Expand Down Expand Up @@ -158,6 +159,7 @@
this.toggleTextEditor(false);
this.toolbar.classList.remove('is-editing', 'edit-mode-text');
this.editing = false;
this.editingXmlElement = null;
},

/**
Expand Down Expand Up @@ -197,7 +199,7 @@
onXmlElementParsed: function(element) {
this.updating = true;
try {
this.parent.updateFragment(this.editingXmlElement, [element]);
this.parent.updateFragment(this.editingXmlElement || this.xmlElement, [element]);
} finally {
this.updating = false;
}
Expand Down

0 comments on commit 8974336

Please sign in to comment.