Hi There,
Just wondering whether it's possible to prevent the edit dialog from being shown if it is requested/opened in a workspace that is locked.
from this code:
function showEditDialog(node, defaultTab) {
if (buildingEditDialog) { return }
if (editStack.includes(node)) { return }
buildingEditDialog = true;
if (node.z && RED.workspaces.isLocked(node.z)) { return }
If I attempt to open an edit dialog on a workspace that is locked, then the buildingEditDialog
flag is set to true and when I then attempt to open another dialog, the flag prevents the dialog from being opened.
Is that correct?
Hmm, at a glance, that looks like a bug. Can you raise an issue? (or even PR the one-liner to move that return up one line?
I can but will be later as I’m currently AFK.
I didn't test my theory but will do before raising issue or creating PR.
Just followed up and tried this out. Turns out that the showEditDialog
function isn't called if a node is defined within a workspace that is locked. So the showEditDialog isn't called and the buildingEditDialog
flag isn't set.
Something else is preventing the function from being called if a workspace is locked - what is blocking that call, I don't know.
So this is a non-issue, please move on, nothing to see here.
EDIT: here the tab editor edit is prevented and here the node edit call is prevented if the workspace is locked.
1 Like