From 03bfb79ca44fcc6a45b5e31bd47f9d3e561310a9 Mon Sep 17 00:00:00 2001 From: Aevann Date: Mon, 15 Jan 2024 04:08:30 +0200 Subject: [PATCH] fix this https://rdrama.net/h/changelog/post/165657/changelog-megathread-marseynotes/5746711#context --- files/assets/js/post.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/files/assets/js/post.js b/files/assets/js/post.js index 904840f2a..efe513f55 100644 --- a/files/assets/js/post.js +++ b/files/assets/js/post.js @@ -52,11 +52,13 @@ if (current_index > -1) { const id_before = post_ids[current_index-1] document.addEventListener('keydown', (e) => { - if (id_before && e.key == 'ArrowLeft') { - location.href = id_before.slice(1, -1) - } - else if (id_after && e.key == 'ArrowRight') { - location.href = id_after.slice(1, -1) + if (document.activeElement.tagName != 'TEXTAREA') { + if (id_before && e.key == 'ArrowLeft') { + location.href = id_before.slice(1, -1) + } + else if (id_after && e.key == 'ArrowRight') { + location.href = id_after.slice(1, -1) + } } })