From 3126ff4eb63b38601efdddf9924f78e9cb14568e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A1=D0=B5=D1=80=D0=B3=D0=B5=D0=B9=20=D0=90=D0=BD=D1=82?= =?UTF-8?q?=D1=80=D0=BE=D0=BF=D0=BE=D0=B2?= Date: Sun, 17 Aug 2025 18:08:22 +0300 Subject: [PATCH] =?UTF-8?q?=D0=A3=D0=B1=D1=80=D0=B0=D0=BD=D1=8B=20=D0=B3?= =?UTF-8?q?=D0=BE=D1=80=D1=8F=D1=87=D0=B8=D0=B5=20=D0=BA=D0=BB=D0=B0=D0=B2?= =?UTF-8?q?=D0=B8=D1=88=D0=B8=20r,=20=D0=BA,=20m=20=D0=B8=20=D0=B4=D0=BE?= =?UTF-8?q?=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5=D0=BD=D0=B0=20=D0=B1=D0=BB=D0=BE?= =?UTF-8?q?=D0=BA=D0=B8=D1=80=D0=BE=D0=B2=D0=BA=D0=B0=20=D0=B3=D0=BE=D1=80?= =?UTF-8?q?=D1=8F=D1=87=D0=B8=D1=85=20=D0=BA=D0=BB=D0=B0=D0=B2=D0=B8=D1=88?= =?UTF-8?q?=20=D0=BF=D1=80=D0=B8=20=D0=B2=D0=B2=D0=BE=D0=B4=D0=B5=20=D0=B2?= =?UTF-8?q?=20=D0=BF=D0=BE=D0=BB=D1=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- templates/index.html | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/templates/index.html b/templates/index.html index 41486cf..6ca4c2e 100644 --- a/templates/index.html +++ b/templates/index.html @@ -4366,8 +4366,21 @@ if (els.lvlErr) { }; } -// Hotkeys: [ ] — tabs, M — multi, R — refresh +// Hotkeys: [ ] — navigation between containers window.addEventListener('keydown', async (e)=>{ + // Проверяем, не находится ли фокус в поле ввода + const activeElement = document.activeElement; + const isInputActive = activeElement && ( + activeElement.tagName === 'INPUT' || + activeElement.tagName === 'TEXTAREA' || + activeElement.contentEditable === 'true' + ); + + // Если фокус в поле ввода, не обрабатываем горячие клавиши + if (isInputActive) { + return; + } + if (e.key==='[' || (e.ctrlKey && e.key==='ArrowLeft')){ e.preventDefault(); const idx = state.services.findIndex(s=> s.id===state.current?.id); @@ -4378,15 +4391,8 @@ window.addEventListener('keydown', async (e)=>{ const idx = state.services.findIndex(s=> s.id===state.current?.id); if (idx>=0 && idx `${s.id}:${s.service}`).join(', '); - const ans = prompt('IDs через запятую:\n'+list); - if (ans) openMulti(ans.split(',').map(x=>x.trim()).filter(Boolean)); - } - if (e.key.toLowerCase()==='r' || e.key.toLowerCase()==='к'){ - e.preventDefault(); - refreshLogsAndCounters(); - } + + }); // Инициализация