@fy-/fws-vue 2.1.1 → 2.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -111,14 +111,26 @@ const modelValueSrc = computed(() => {
|
|
|
111
111
|
const start = reactive({ x: 0, y: 0 });
|
|
112
112
|
|
|
113
113
|
const touchStart = (event: TouchEvent) => {
|
|
114
|
-
event.preventDefault();
|
|
115
114
|
const touch = event.touches[0];
|
|
115
|
+
const targetElement = touch.target as HTMLElement;
|
|
116
|
+
|
|
117
|
+
// Check if the touch started on an interactive element
|
|
118
|
+
if (targetElement.closest("button, a, input, textarea, select")) {
|
|
119
|
+
return; // Don't handle swipe if interacting with an interactive element
|
|
120
|
+
}
|
|
121
|
+
|
|
116
122
|
start.x = touch.screenX;
|
|
117
123
|
start.y = touch.screenY;
|
|
118
124
|
};
|
|
119
|
-
|
|
120
125
|
const touchEnd = (event: TouchEvent) => {
|
|
121
126
|
const touch = event.changedTouches[0];
|
|
127
|
+
const targetElement = touch.target as HTMLElement;
|
|
128
|
+
|
|
129
|
+
// Check if the touch ended on an interactive element
|
|
130
|
+
if (targetElement.closest("button, a, input, textarea, select")) {
|
|
131
|
+
return; // Don't handle swipe if interacting with an interactive element
|
|
132
|
+
}
|
|
133
|
+
|
|
122
134
|
const end = { x: touch.screenX, y: touch.screenY };
|
|
123
135
|
|
|
124
136
|
const diffX = start.x - end.x;
|