File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change 114114
115115
116116 let touch_active = false ;
117+ let ts
117118
118119 function onMove (e ){
119120 if (touch_active) {
124125 if (((pos_axis == 0 && (axis < _axis)) || (pos_axis == availableMeasure && (axis > _axis)))){
125126 return ;
126127 }
128+ const te = e .touches ? e .touches [0 ].clientX : e .clientX
129+ const isVerticalScroll = Math .abs (ts - te) < 5
130+ if (! is_vertical && isVerticalScroll) {
131+ // prevent blocked scroll when user attempts vertical scrolling
132+ return
133+ }
127134 e .preventDefault ();
128135
129136 if (distance <= availableMeasure && distance >= 0 ) {
142149 e .stopPropagation ();
143150 touch_active = true ;
144151 longTouch = false ;
152+ ts = e .touches ? e .touches [0 ].clientX : e .clientX
145153 setTimeout (function () {
146154 longTouch = true ;
147155 }, 250 );
You can’t perform that action at this time.
0 commit comments