feat(terminal): dispatch focus event for terminal after connection and enhance focus handling in JavaScript

This commit is contained in:
Andras Bacsai
2025-07-18 21:19:32 +02:00
parent fe900d3cd7
commit 43ff38d914
3 changed files with 29 additions and 1 deletions

View File

@@ -158,6 +158,9 @@ class ExecuteContainerCommand extends Component
data_get($server, 'name'),
data_get($server, 'uuid')
);
// Dispatch a frontend event to ensure terminal gets focus after connection
$this->dispatch('terminal-should-focus');
} catch (\Throwable $e) {
return handleError($e, $this);
} finally {
@@ -213,6 +216,9 @@ class ExecuteContainerCommand extends Component
data_get($container, 'container.Names'),
data_get($container, 'server.uuid')
);
// Dispatch a frontend event to ensure terminal gets focus after connection
$this->dispatch('terminal-should-focus');
} catch (\Throwable $e) {
return handleError($e, $this);
} finally {