This repository was archived by the owner on Jan 19, 2026. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change 172172 return ;
173173 }
174174
175+ // Prevent text selection and context menu on iOS
176+ e .preventDefault ();
177+
175178 touchStartY = e .touches [0 ].clientY ;
176179 touchStartIndex = index;
177180 touchDragEnabled = false ;
362365 };
363366 const touchMoveHandler = (e ) => handleTouchMove (e);
364367 const touchEndHandler = handleTouchEnd;
368+ const contextMenuHandler = (e ) => {
369+ // Prevent context menu on long press (iOS)
370+ e .preventDefault ();
371+ };
365372
366373 card .addEventListener (' touchstart' , touchStartHandler, { passive: false });
367374 card .addEventListener (' touchmove' , touchMoveHandler, { passive: false });
368375 card .addEventListener (' touchend' , touchEndHandler, { passive: false });
376+ card .addEventListener (' contextmenu' , contextMenuHandler);
369377
370378 cleanup .push (() => {
371379 card .removeEventListener (' touchstart' , touchStartHandler);
372380 card .removeEventListener (' touchmove' , touchMoveHandler);
373381 card .removeEventListener (' touchend' , touchEndHandler);
382+ card .removeEventListener (' contextmenu' , contextMenuHandler);
374383 });
375384 });
376385
573582
574583 .task - card {
575584 transition: all 0 .25s ease;
585+ - webkit- user- select: none;
586+ user- select: none;
587+ - webkit- touch- callout: none;
576588 }
577589
578590 .task - wrapper: has (.subtask ) {
You can’t perform that action at this time.
0 commit comments