From eca5da4a55724b62170e2237c8db73d8740cc749 Mon Sep 17 00:00:00 2001 From: Oliver Hamlet Date: Wed, 15 Jul 2015 11:04:14 +0100 Subject: [PATCH] Fixed editor data not cleared on cancel. --- resources/report/html/loot-plugin-card.html | 1 + resources/report/js/events.js | 1 + 2 files changed, 2 insertions(+) diff --git a/resources/report/html/loot-plugin-card.html b/resources/report/html/loot-plugin-card.html index 1ea0b308..d33bda25 100644 --- a/resources/report/html/loot-plugin-card.html +++ b/resources/report/html/loot-plugin-card.html @@ -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; diff --git a/resources/report/js/events.js b/resources/report/js/events.js index 9bacab53..66017fc3 100644 --- a/resources/report/js/events.js +++ b/resources/report/js/events.js @@ -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. */