Skip to content

Commit

Permalink
Merge pull request #2311 from laws-africa/fix-full-edit
Browse files Browse the repository at this point in the history
check parentNode, _not_ parentElement (null when editing Entire document)
  • Loading branch information
goose-life authored Dec 13, 2024
2 parents 51c827e + 268d70f commit 2a21220
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@
if (elements.length) {
this.onTextElementParsed(elements);
this.closeTextEditor();
} else if (this.xmlElement.parentElement.tagName === 'portionBody') {
} else if (this.xmlElement.parentNode.tagName === 'portionBody') {
alert($t('You cannot delete the whole provision in provision editing mode.'));
} else if (confirm($t('Go ahead and delete this provision from the document?'))) {
this.parent.removeFragment(this.editingXmlElement);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ class AknTextEditor {
let newElement = $.parseXML(xml);

// if the top-level eId changed in provision mode, reload the page when saving later (just set the flag here)
if (this.xmlElement.parentElement.tagName === 'portionBody') {
if (this.xmlElement.parentNode.tagName === 'portionBody') {
// set it back to false if the eId is changed back before saving too
this.reloadOnSave = newElement.firstChild.firstChild.getAttribute('eId') !== Indigo.Preloads.provisionEid;
}
Expand Down

0 comments on commit 2a21220

Please sign in to comment.