Skip to content

Commit

Permalink
handle dodgy markup better
Browse files Browse the repository at this point in the history
  • Loading branch information
longhotsummer committed Dec 6, 2024
1 parent f2e8973 commit c326192
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
14 changes: 8 additions & 6 deletions indigo_app/static/javascript/indigo/views/document_editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -137,12 +137,14 @@
btn.removeAttribute('disabled');
}

if (elements && elements.length) {
this.onTextElementParsed(elements);
this.closeTextEditor();
} else if (confirm($t('Go ahead and delete this section from the document?'))) {
this.parent.removeFragment(this.editingXmlElement);
this.closeTextEditor();
if (elements) {
if (elements.length) {
this.onTextElementParsed(elements);
this.closeTextEditor();
} else if (confirm($t('Go ahead and delete this section from the document?'))) {
this.parent.removeFragment(this.editingXmlElement);
this.closeTextEditor();
}
}
},

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,8 @@ class AknTextEditor {
} else {
Indigo.errorView.show(resp.statusText);
}

return null;
}

toggleWordWrap (e) {
Expand Down

0 comments on commit c326192

Please sign in to comment.