diff --git a/public/script.js b/public/script.js index 15695d343..572215d2e 100644 --- a/public/script.js +++ b/public/script.js @@ -813,7 +813,12 @@ export async function selectCharacterById(id, { switchMenu = true } = {}) { select_selected_character(this_chid, { switchMenu }); } - if (isMobile()) { + //close open char panel if it was already open + //avoids opening the char panel via Welcome Screen recent chats + //or other means of calling this function (such as QRs with /go). + //there should be no cases on mobile where char panel is open and + //you're able to get here other than an avatar click. + if (isMobile() && $('#rightNavDrawerIcon').hasClass('openIcon')) { $('#rightNavDrawerIcon').trigger('click'); } }