From a13d3f643c7a8cc52761f36a128710152118b055 Mon Sep 17 00:00:00 2001 From: Cohee <18619528+Cohee1207@users.noreply.github.com> Date: Fri, 13 Sep 2024 21:35:42 +0300 Subject: [PATCH] Fix shift+click in chat manager --- public/scripts/bookmarks.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/public/scripts/bookmarks.js b/public/scripts/bookmarks.js index 08d75879b..7ce811b9d 100644 --- a/public/scripts/bookmarks.js +++ b/public/scripts/bookmarks.js @@ -609,8 +609,9 @@ export function initBookmarks() { $(document).on('click', '.select_chat_block, .mes_bookmark', async function (e) { // If shift is held down, we are not following the bookmark, but creating a new one - if (e.shiftKey) { - const selectedMesId = $(this).closest('.mes').attr('mesid'); + const mes = $(this).closest('.mes'); + if (e.shiftKey && mes.length) { + const selectedMesId = mes.attr('mesid'); await createNewBookmark(Number(selectedMesId)); return; }