Fix swipe to not apply at specific elements

This commit is contained in:
kwaroran
2024-09-14 02:44:12 +09:00
parent cfd6bed82a
commit b334ef9fff

View File

@@ -149,6 +149,10 @@ export function initMobileGesture(){
document.addEventListener('touchstart', (ev) => {
for(const touch of ev.changedTouches){
const ele = touch.target as HTMLElement
if(ele.tagName === 'BUTTON' || ele.tagName === 'INPUT' || ele.tagName === 'SELECT' || ele.tagName === 'TEXTAREA'){
return
}
pressingPointers.set(touch.identifier, {x: touch.clientX, y: touch.clientY})
}
}, {