Fix swipe gesture, using target
| @@ -896,8 +896,7 @@ export function initRossMods() { | |||
| 896 | 896 | ||
| 897 | restoreUserInput(); | 897 | restoreUserInput(); |
| 898 | 898 | ||
| 899 | //Regenerate if user swipes on the last mesage in chat | 899 | // Swipe gestures (see: https://www.npmjs.com/package/swiped-events) |
| 900 | |||
| 901 | document.addEventListener('swiped-left', function (e) { | 900 | document.addEventListener('swiped-left', function (e) { |
| 902 | if (power_user.gestures === false) { | 901 | if (power_user.gestures === false) { |
| 903 | return; | 902 | return; |
| @@ -905,7 +904,7 @@ export function initRossMods() { | |||
| 905 | if (Popup.util.isPopupOpen()) { | 904 | if (Popup.util.isPopupOpen()) { |
| 906 | return; | 905 | return; |
| 907 | } | 906 | } |
| 908 | if (!$('#sheld').is(':focus-within')) { | 907 | if (!$(e.target).closest('#sheld').length) { |
| 909 | return; | 908 | return; |
| 910 | } | 909 | } |
| 911 | var SwipeButR = $('.swipe_right:last'); | 910 | var SwipeButR = $('.swipe_right:last'); |
| @@ -923,7 +922,7 @@ export function initRossMods() { | |||
| 923 | if (Popup.util.isPopupOpen()) { | 922 | if (Popup.util.isPopupOpen()) { |
| 924 | return; | 923 | return; |
| 925 | } | 924 | } |
| 926 | if (!$('#sheld').is(':focus-within')) { | 925 | if (!$(e.target).closest('#sheld').length) { |
| 927 | return; | 926 | return; |
| 928 | } | 927 | } |
| 929 | var SwipeButL = $('.swipe_left:last'); | 928 | var SwipeButL = $('.swipe_left:last'); |