1
0

keydown event listener moved in its own section KEYBOARD HANDLING.

This commit is contained in:
Alexander Andreev 2022-10-31 01:44:27 +04:00
parent 1adda7d437
commit 714d0816b5
Signed by: Arav
GPG Key ID: 0388CC8FAA51063F

View File

@ -110,6 +110,16 @@ b_next.addEventListener("click", e => {
e.preventDefault(); e.preventDefault();
}); });
for (let i = 0; i < file_links.length; ++i)
file_links[i].addEventListener("click", e => {
g_current_row = e.target.parentNode.parentNode;
if (send_to_overlay(e.target.pathname, determine_media_element(e.target.pathname)))
e.preventDefault();
});
//// KEYBOARD HANDLING
window.addEventListener("keydown", e => { window.addEventListener("keydown", e => {
if (e.isComposing) if (e.isComposing)
return; return;
@ -145,14 +155,6 @@ window.addEventListener("keydown", e => {
} }
}); });
for (let i = 0; i < file_links.length; ++i)
file_links[i].addEventListener("click", e => {
g_current_row = e.target.parentNode.parentNode;
if (send_to_overlay(e.target.pathname, determine_media_element(e.target.pathname)))
e.preventDefault();
});
//// FILTERING //// FILTERING