@gfazioli/mantine-window 0.5.6 → 0.5.7
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.
|
@@ -109,6 +109,9 @@ function useMantineWindow(props) {
|
|
|
109
109
|
if (e.target.closest("[data-resize-handle]")) {
|
|
110
110
|
return;
|
|
111
111
|
}
|
|
112
|
+
if (!e.touches[0]) {
|
|
113
|
+
return;
|
|
114
|
+
}
|
|
112
115
|
const touch = e.touches[0];
|
|
113
116
|
bringToFront();
|
|
114
117
|
isDragging.current = true;
|
|
@@ -144,6 +147,9 @@ function useMantineWindow(props) {
|
|
|
144
147
|
);
|
|
145
148
|
const handleTouchStartResizeTopLeft = useCallback(
|
|
146
149
|
(e) => {
|
|
150
|
+
if (!e.touches[0]) {
|
|
151
|
+
return;
|
|
152
|
+
}
|
|
147
153
|
const touch = e.touches[0];
|
|
148
154
|
bringToFront();
|
|
149
155
|
isResizing.current = true;
|
|
@@ -183,6 +189,9 @@ function useMantineWindow(props) {
|
|
|
183
189
|
);
|
|
184
190
|
const handleTouchStartResizeTop = useCallback(
|
|
185
191
|
(e) => {
|
|
192
|
+
if (!e.touches[0]) {
|
|
193
|
+
return;
|
|
194
|
+
}
|
|
186
195
|
const touch = e.touches[0];
|
|
187
196
|
bringToFront();
|
|
188
197
|
isResizing.current = true;
|
|
@@ -222,6 +231,9 @@ function useMantineWindow(props) {
|
|
|
222
231
|
);
|
|
223
232
|
const handleTouchStartResizeTopRight = useCallback(
|
|
224
233
|
(e) => {
|
|
234
|
+
if (!e.touches[0]) {
|
|
235
|
+
return;
|
|
236
|
+
}
|
|
225
237
|
const touch = e.touches[0];
|
|
226
238
|
bringToFront();
|
|
227
239
|
isResizing.current = true;
|
|
@@ -261,6 +273,9 @@ function useMantineWindow(props) {
|
|
|
261
273
|
);
|
|
262
274
|
const handleTouchStartResizeRight = useCallback(
|
|
263
275
|
(e) => {
|
|
276
|
+
if (!e.touches[0]) {
|
|
277
|
+
return;
|
|
278
|
+
}
|
|
264
279
|
const touch = e.touches[0];
|
|
265
280
|
bringToFront();
|
|
266
281
|
isResizing.current = true;
|
|
@@ -300,6 +315,9 @@ function useMantineWindow(props) {
|
|
|
300
315
|
);
|
|
301
316
|
const handleTouchStartResizeBottomRight = useCallback(
|
|
302
317
|
(e) => {
|
|
318
|
+
if (!e.touches[0]) {
|
|
319
|
+
return;
|
|
320
|
+
}
|
|
303
321
|
const touch = e.touches[0];
|
|
304
322
|
bringToFront();
|
|
305
323
|
isResizing.current = true;
|
|
@@ -339,6 +357,9 @@ function useMantineWindow(props) {
|
|
|
339
357
|
);
|
|
340
358
|
const handleTouchStartResizeBottom = useCallback(
|
|
341
359
|
(e) => {
|
|
360
|
+
if (!e.touches[0]) {
|
|
361
|
+
return;
|
|
362
|
+
}
|
|
342
363
|
const touch = e.touches[0];
|
|
343
364
|
bringToFront();
|
|
344
365
|
isResizing.current = true;
|
|
@@ -378,6 +399,9 @@ function useMantineWindow(props) {
|
|
|
378
399
|
);
|
|
379
400
|
const handleTouchStartResizeBottomLeft = useCallback(
|
|
380
401
|
(e) => {
|
|
402
|
+
if (!e.touches[0]) {
|
|
403
|
+
return;
|
|
404
|
+
}
|
|
381
405
|
const touch = e.touches[0];
|
|
382
406
|
bringToFront();
|
|
383
407
|
isResizing.current = true;
|
|
@@ -417,6 +441,9 @@ function useMantineWindow(props) {
|
|
|
417
441
|
);
|
|
418
442
|
const handleTouchStartResizeLeft = useCallback(
|
|
419
443
|
(e) => {
|
|
444
|
+
if (!e.touches[0]) {
|
|
445
|
+
return;
|
|
446
|
+
}
|
|
420
447
|
const touch = e.touches[0];
|
|
421
448
|
bringToFront();
|
|
422
449
|
isResizing.current = true;
|
|
@@ -558,6 +585,9 @@ function useMantineWindow(props) {
|
|
|
558
585
|
}
|
|
559
586
|
};
|
|
560
587
|
const handleTouchMove = (e) => {
|
|
588
|
+
if (!e.touches[0]) {
|
|
589
|
+
return;
|
|
590
|
+
}
|
|
561
591
|
if (isDragging.current || isResizing.current) {
|
|
562
592
|
const touch = e.touches[0];
|
|
563
593
|
if (isDragging.current) {
|