From dd601b58332d0db8386a2e46de5061994105b422 Mon Sep 17 00:00:00 2001 From: bordun Date: Mon, 21 Sep 2020 22:01:12 +0200 Subject: [PATCH] editor: error when selecting a tab/root widget while a property field contains unsubmitted changes --- CHANGELOG.md | 1 + src/client/editor/context-menu.js | 2 +- src/client/ui/ui-inspector.js | 3 +++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d2236115..87674a08 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ - bug fixes - editor: hide impossible actions from context-menu (eg adding widgets in tab containers) + - editor: error when selecting a tab/root widget while a property field contains unsubmitted changes - panel: layout issue with tabs & lineWidth property - midi diff --git a/src/client/editor/context-menu.js b/src/client/editor/context-menu.js index 01f9dac3..b572cf84 100644 --- a/src/client/editor/context-menu.js +++ b/src/client/editor/context-menu.js @@ -205,7 +205,7 @@ var handleClick = function(event) { }) } - + } diff --git a/src/client/ui/ui-inspector.js b/src/client/ui/ui-inspector.js index 3f572b93..2338218f 100644 --- a/src/client/ui/ui-inspector.js +++ b/src/client/ui/ui-inspector.js @@ -175,6 +175,7 @@ class UiInspector extends UiWidget { if (category) content.appendChild(category) + this.lock = true if (this.mounted) { morph(this.container.firstChild, content) @@ -183,6 +184,7 @@ class UiInspector extends UiWidget { } this.mounted = true + this.lock = false if (this.colorPicker.opened) { @@ -195,6 +197,7 @@ class UiInspector extends UiWidget { } + } onChange(event) {