mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2024-12-12 01:17:39 +01:00
Quick fix for arrowkey swipe stuff
This commit is contained in:
parent
3737f58072
commit
91434a3ba8
@ -949,8 +949,15 @@ export function initRossMods() {
|
||||
CheckLocal();
|
||||
}
|
||||
|
||||
// Helper function to check if nanogallery2's lightbox is active
|
||||
function isNanogallery2LightboxActive() {
|
||||
// Check if the body has the 'nGY2On' class, adjust this based on actual behavior
|
||||
return $('body').hasClass('nGY2_body_scrollbar');
|
||||
}
|
||||
|
||||
if (event.key == "ArrowLeft") { //swipes left
|
||||
if (
|
||||
!isNanogallery2LightboxActive() && // Check if lightbox is NOT active
|
||||
$(".swipe_left:last").css('display') === 'flex' &&
|
||||
$("#send_textarea").val() === '' &&
|
||||
$("#character_popup").css("display") === "none" &&
|
||||
@ -962,6 +969,7 @@ export function initRossMods() {
|
||||
}
|
||||
if (event.key == "ArrowRight") { //swipes right
|
||||
if (
|
||||
!isNanogallery2LightboxActive() && // Check if lightbox is NOT active
|
||||
$(".swipe_right:last").css('display') === 'flex' &&
|
||||
$("#send_textarea").val() === '' &&
|
||||
$("#character_popup").css("display") === "none" &&
|
||||
@ -972,6 +980,7 @@ export function initRossMods() {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (event.ctrlKey && event.key == "ArrowUp") { //edits last USER message if chatbar is empty and focused
|
||||
if (
|
||||
$("#send_textarea").val() === '' &&
|
||||
|
Loading…
Reference in New Issue
Block a user