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(); - } + + }); // Инициализация