mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2024-12-12 01:17:39 +01:00
Merge pull request #2769 from SillyTavern/fix-swipes-with-floating-prompts
Allow mobile swipes with open panels if focused
This commit is contained in:
commit
58e6ae2fc5
@ -896,8 +896,7 @@ export function initRossMods() {
|
|||||||
|
|
||||||
restoreUserInput();
|
restoreUserInput();
|
||||||
|
|
||||||
//Regenerate if user swipes on the last mesage in chat
|
// Swipe gestures (see: https://www.npmjs.com/package/swiped-events)
|
||||||
|
|
||||||
document.addEventListener('swiped-left', function (e) {
|
document.addEventListener('swiped-left', function (e) {
|
||||||
if (power_user.gestures === false) {
|
if (power_user.gestures === false) {
|
||||||
return;
|
return;
|
||||||
@ -905,7 +904,7 @@ export function initRossMods() {
|
|||||||
if (Popup.util.isPopupOpen()) {
|
if (Popup.util.isPopupOpen()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if ($('.mes_edit_buttons, .drawer-content, #character_popup, #dialogue_popup, #WorldInfo, #right-nav-panel, #left-nav-panel, #select_chat_popup, #floatingPrompt').is(':visible')) {
|
if (!$(e.target).closest('#sheld').length) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
var SwipeButR = $('.swipe_right:last');
|
var SwipeButR = $('.swipe_right:last');
|
||||||
@ -923,7 +922,7 @@ export function initRossMods() {
|
|||||||
if (Popup.util.isPopupOpen()) {
|
if (Popup.util.isPopupOpen()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if ($('.mes_edit_buttons, .drawer-content, #character_popup, #dialogue_popup, #WorldInfo, #right-nav-panel, #left-nav-panel, #select_chat_popup, #floatingPrompt').is(':visible')) {
|
if (!$(e.target).closest('#sheld').length) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
var SwipeButL = $('.swipe_left:last');
|
var SwipeButL = $('.swipe_left:last');
|
||||||
|
Loading…
Reference in New Issue
Block a user