From af42664d7355f638de80df581da56c37bb06df03 Mon Sep 17 00:00:00 2001 From: Kazuhito Yokoi Date: Sat, 20 Jul 2024 13:36:37 +0900 Subject: [PATCH] Refresh page title after changing tab name --- .../@node-red/editor-client/src/js/ui/workspaces.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/workspaces.js b/packages/node_modules/@node-red/editor-client/src/js/ui/workspaces.js index 0d7b1da54..365d827f7 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/ui/workspaces.js +++ b/packages/node_modules/@node-red/editor-client/src/js/ui/workspaces.js @@ -904,6 +904,13 @@ RED.workspaces = (function() { } }, refresh: function() { + var workspace = RED.nodes.workspace(RED.workspaces.active()); + if (workspace) { + document.title = `${documentTitle} : ${workspace.label}`; + } else { + var subflow = RED.nodes.subflow(RED.workspaces.active()); + document.title = `${documentTitle} : ${subflow.name}`; + } RED.nodes.eachWorkspace(function(ws) { workspace_tabs.renameTab(ws.id,ws.label); $("#red-ui-tab-"+(ws.id.replace(".","-"))).attr("flowname",ws.label)