Fixed editor data not cleared on cancel.

This commit is contained in:
Oliver Hamlet
2015-07-15 11:04:14 +01:00
parent be99572859
commit eca5da4a55
2 changed files with 2 additions and 0 deletions
@@ -353,6 +353,7 @@ loot-clear-metadata
/* If the editor hasn't already been opened, its data is not yet set, so do that now. */
if (!card.data.isEditorOpen && !card.data.editor) {
card.shadowRoot.getElementById('editor').data = card.data;
card.shadowRoot.getElementById('editor').setEditorData(card.data);
}
card.data.isEditorOpen = true;
+1
View File
@@ -494,6 +494,7 @@ function onEditorClose(evt) {
/* Don't need to record changes, but still need to notify C++ side that
the editor has been closed. */
loot.query('editorClosed').catch(processCefError);
delete evt.target.data.editor;
}
/* Now hide editor. */