From 4cd4b94a4bb3e951d319658f192793c16e92362f Mon Sep 17 00:00:00 2001 From: Richard Schreiber Date: Thu, 4 Aug 2022 17:12:57 +0200 Subject: [PATCH] set toolbox other/other_i18n input.value to empty string if not needed --- src/pretix/static/pretixcontrol/js/ui/editor.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/pretix/static/pretixcontrol/js/ui/editor.js b/src/pretix/static/pretixcontrol/js/ui/editor.js index 381e10eeac..689f81cd72 100644 --- a/src/pretix/static/pretixcontrol/js/ui/editor.js +++ b/src/pretix/static/pretixcontrol/js/ui/editor.js @@ -620,6 +620,14 @@ var editor = { } } + // empty text-inputs if not in use + if ($("#toolbox-content").val() !== "other") { + $("#toolbox-content-other").val(""); + } + if ($("#toolbox-content").val() !== "other_i18n") { + $("#toolbox-content-other-i18n textarea").val(""); + } + o.setCoords(); editor.fabric.renderAll(); },