From be646dfe9b40b4efc7111c2237a8bc07c8215b65 Mon Sep 17 00:00:00 2001 From: XnpioChV Date: Mon, 16 Dec 2024 12:23:01 -0500 Subject: [PATCH] fix: add notify() to render in xblock_v2 to fix save block --- common/templates/xblock_v2/xblock_iframe.html | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/common/templates/xblock_v2/xblock_iframe.html b/common/templates/xblock_v2/xblock_iframe.html index bf3326eb1986..853c05605344 100644 --- a/common/templates/xblock_v2/xblock_iframe.html +++ b/common/templates/xblock_v2/xblock_iframe.html @@ -215,6 +215,13 @@ } return url; }, + notify: () => { + /** + * Used in `studio_view` + * + * TODO: Do nothing for now + * **/ + } }; /** @@ -328,6 +335,10 @@ event.preventDefault(); window.parent.postMessage('cancel-clicked', '*'); }); + document.querySelector('.save-button').addEventListener('click', function() { + event.preventDefault(); + window.parent.postMessage('save-clicked', '*'); + });