Merge pull request #5170 from GogoVega/fix-5115

Prevent the editor to open the same dialog multiple times
This commit is contained in:
Nick O'Leary
2025-06-25 14:54:52 +01:00
committed by GitHub

View File

@@ -1017,6 +1017,7 @@ RED.editor = (function() {
function showEditDialog(node, defaultTab) {
if (buildingEditDialog) { return }
if (editStack.includes(node)) { return }
buildingEditDialog = true;
if (node.z && RED.workspaces.isLocked(node.z)) { return }
var editing_node = node;
@@ -1334,6 +1335,7 @@ RED.editor = (function() {
var editing_config_node = RED.nodes.node(id);
var activeEditPanes = [];
if (editStack.includes(editing_config_node)) { return }
if (editing_config_node && editing_config_node.z && RED.workspaces.isLocked(editing_config_node.z)) { return }
var configNodeScope = ""; // default to global
@@ -1777,6 +1779,7 @@ RED.editor = (function() {
function showEditSubflowDialog(subflow, defaultTab) {
if (buildingEditDialog) { return }
if (editStack.includes(subflow)) { return }
buildingEditDialog = true;
editStack.push(subflow);
@@ -1993,6 +1996,7 @@ RED.editor = (function() {
function showEditGroupDialog(group, defaultTab) {
if (buildingEditDialog) { return }
if (editStack.includes(group)) { return }
buildingEditDialog = true;
if (group.z && RED.workspaces.isLocked(group.z)) { return }
var editing_node = group;
@@ -2107,6 +2111,7 @@ RED.editor = (function() {
function showEditFlowDialog(workspace, defaultTab) {
if (buildingEditDialog) { return }
if (editStack.includes(workspace)) { return }
buildingEditDialog = true;
var activeEditPanes = [];
RED.view.state(RED.state.EDITING);