fix(terminal): fix new tab auto-focus and NaN error on data before layout (#14357)

- Fix new tab not auto-focusing: add FocusNode to TerminalView and
  request focus when tab is selected via tab state listener
- Fix NaN error when data arrives before terminal view layout: buffer
  output data until terminal view has valid dimensions, flush on first
  valid resize callback

Signed-off-by: fufesou <linlong1266@gmail.com>
This commit is contained in:
fufesou
2026-02-20 14:44:25 +08:00
committed by GitHub
parent 34ceeac36e
commit 483fe80308
3 changed files with 120 additions and 6 deletions

View File

@@ -92,6 +92,7 @@ class _TerminalTabPageState extends State<TerminalTabPage> {
key: ValueKey(tabKey),
id: peerId,
terminalId: terminalId,
tabKey: tabKey,
password: password,
isSharedPassword: isSharedPassword,
tabController: tabController,