File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change 198198 // Only track touches on the card-code area
199199 if ( ! e . target . closest ( '.card-code' ) ) return ;
200200
201- touchStartX = e . changedTouches [ 0 ] . screenX ;
202- touchStartY = e . changedTouches [ 0 ] . screenY ;
201+ touchStartX = e . changedTouches [ 0 ] . clientX ;
202+ touchStartY = e . changedTouches [ 0 ] . clientY ;
203203 isSwiping = false ;
204204 } , { passive : true } ) ;
205205
214214 // Only handle touches on the card-code area
215215 if ( ! e . target . closest ( '.card-code' ) ) return ;
216216
217- touchEndX = e . changedTouches [ 0 ] . screenX ;
218- touchEndY = e . changedTouches [ 0 ] . screenY ;
217+ touchEndX = e . changedTouches [ 0 ] . clientX ;
218+ touchEndY = e . changedTouches [ 0 ] . clientY ;
219219
220220 const deltaX = touchEndX - touchStartX ;
221221 const deltaY = touchEndY - touchStartY ;
245245 card . addEventListener ( 'click' , ( e ) => {
246246 if ( e . target . closest ( '.card-code' ) ) {
247247 e . preventDefault ( ) ;
248+ e . stopPropagation ( ) ;
248249 }
249250 } ) ;
250251 } ) ;
You can’t perform that action at this time.
0 commit comments