From 9179b7989e1d47fbc950e38312b34823da3a070c Mon Sep 17 00:00:00 2001 From: ssdfasd <2156608475@qq.com> Date: Sat, 21 Mar 2026 21:27:17 +0800 Subject: [PATCH] =?UTF-8?q?@=EF=BC=81=EF=BC=81=EF=BC=81=E7=A0=B4=E7=A2=8E?= =?UTF-8?q?=E9=97=AE=E9=A2=98=E7=94=A8=E5=BB=B6=E6=97=B6=E8=A7=A3=E5=86=B3?= =?UTF-8?q?=EF=BC=81=EF=BC=81=EF=BC=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/frontend/index.html | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/src/frontend/index.html b/src/frontend/index.html index 2929dfd..d06ed1e 100644 --- a/src/frontend/index.html +++ b/src/frontend/index.html @@ -231,15 +231,13 @@ term.loadAddon(fitAddon); term.open(terminalContainer); - requestAnimationFrame(() => { - requestAnimationFrame(() => { - fitAddon.fit(); - if (ws && ws.readyState === WebSocket.OPEN) { - ws.send(`\x1b[8;${term.rows};${term.cols}t`); - } - term.focus(); - }); - }); + setTimeout(() => { + fitAddon.fit(); + if (ws && ws.readyState === WebSocket.OPEN) { + ws.send(`\x1b[8;${term.rows};${term.cols}t`); + } + term.focus(); + }, 100); ws.binaryType = 'arraybuffer';