File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed
Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -549,19 +549,24 @@ export default {
549549 touchStart (touchEvent ) {
550550 if (touchEvent .changedTouches .length === 1 ) {
551551 const posXStart = touchEvent .changedTouches [0 ].clientX
552+ const posYStart = touchEvent .changedTouches [0 ].clientY
552553
553554 addEventListener (
554555 ' touchend' ,
555- touchEvent => this .touchEnd (touchEvent, posXStart),
556+ touchEvent => this .touchEnd (touchEvent, posXStart, posYStart ),
556557 { once: true }
557558 )
558559 }
559560 },
560- touchEnd (touchEvent , posXStart ) {
561+ touchEnd (touchEvent , posXStart , posYStart ) {
561562 if (touchEvent .changedTouches .length === 1 ) {
562563 const posXEnd = touchEvent .changedTouches [0 ].clientX
564+ const posYEnd = touchEvent .changedTouches [0 ].clientY
563565
564- if (posXEnd - posXStart > 30 ) {
566+ const swippedRight = posXEnd - posXStart > 30
567+ const swippedVertically = Math .abs (posYEnd - posYStart) > 50
568+
569+ if (swippedRight && ! swippedVertically) {
565570 this .$emit (' toggle-rooms-list' )
566571 }
567572 }
You can’t perform that action at this time.
0 commit comments