- fixed touch swipe detection

- removed unnecessary hideswipebuttons calls
- restyled swipe buttons to display flex
This commit is contained in:
RossAsscends
2023-03-18 13:25:17 +09:00
parent 440c2851f2
commit 33659c4e7a
3 changed files with 23 additions and 19 deletions

View File

@@ -279,7 +279,8 @@ $("document").ready(function () {
var SwipeButR = $('.swipe_right:last');
var SwipeTargetMesClassParent = e.target.closest('.last_mes');
if (SwipeTargetMesClassParent !== null) {
if (SwipeButR.attr('style') == 'display: flex;' == true) {
if (SwipeButR.css('display') === 'flex') {
//if (SwipeButR.attr('style') == 'display: flex;' == true) {
SwipeButR.click();
}
}
@@ -287,8 +288,10 @@ $("document").ready(function () {
document.addEventListener('swiped-right', function (e) {
var SwipeButL = $('.swipe_left:last');
var SwipeTargetMesClassParent = e.target.closest('.last_mes');
//console.log('Touch swipe check -- closest last_mes = "' + (SwipeTargetMesClassParent !== null) + ' Button display = ' + (SwipeButL.attr('style') == 'display: flex;' == true));
if (SwipeTargetMesClassParent !== null) {
if (SwipeButL.attr('style') == 'display: flex;' == true) {
if (SwipeButL.css('display') === 'flex') {
//if (SwipeButL.attr('style') == 'display: flex;' == true) {
SwipeButL.click();
}
}