From 73f6b792c55350c03d946725f7b397c533127ed7 Mon Sep 17 00:00:00 2001 From: David Edler Date: Wed, 17 Jan 2024 13:03:16 +0100 Subject: [PATCH] fix(terminal) avoid prompt on navigation away from terminal, when terminal websocket is closed Signed-off-by: David Edler --- src/pages/instances/InstanceTerminal.tsx | 1 + src/pages/instances/InstanceTextConsole.tsx | 1 + 2 files changed, 2 insertions(+) diff --git a/src/pages/instances/InstanceTerminal.tsx b/src/pages/instances/InstanceTerminal.tsx index ad7db00c05..73e55bd24f 100644 --- a/src/pages/instances/InstanceTerminal.tsx +++ b/src/pages/instances/InstanceTerminal.tsx @@ -143,6 +143,7 @@ const InstanceTerminal: FC = ({ instance }) => { ); } setDataWs(null); + setUserInteracted(false); }; data.binaryType = "arraybuffer"; diff --git a/src/pages/instances/InstanceTextConsole.tsx b/src/pages/instances/InstanceTextConsole.tsx index aef097fa03..5133cbc2f2 100644 --- a/src/pages/instances/InstanceTextConsole.tsx +++ b/src/pages/instances/InstanceTextConsole.tsx @@ -118,6 +118,7 @@ const InstanceTextConsole: FC = ({ onFailure("Error", event.reason, getWsErrorMsg(event.code)); } setDataWs(null); + setUserInteracted(false); }; data.binaryType = "arraybuffer";