Commit 7bfbdebb authored by Vitaly Lipatov's avatar Vitaly Lipatov

route-web-api: fix Enter triggering both check and bypass-add

The input field had two Enter handlers running in parallel: the inline onkeydown calling checkDomain(), and an addEventListener calling addEntry('bypass'). preventDefault() in the inline handler does not cancel the second listener. Result: pressing Enter both checked the domain AND added it to the bypass list, clearing the input before the user could see the check results. Drop the addEventListener block — Enter now only triggers checkDomain(). Adding to bypass/direct/geo remains via the explicit buttons. Co-Authored-By: 's avatarClaude Opus 4.7 (1M context) <noreply@anthropic.com>
parent 588ca4fd
......@@ -1184,10 +1184,6 @@ async function checkDomain() {
btn.textContent = '\\u041f\\u0440\\u043e\\u0432\\u0435\\u0440\\u0438\\u0442\\u044c';
}
$('domain').addEventListener('keydown', e => {
if (e.key === 'Enter') addEntry('bypass');
});
refresh();
(function(){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment