forked from akai/readest
feat(ux): improve pull-down interaction for mobile modal (#440)
* Adjusts overlay background opacity dynamically based on drag position * Ensures smooth transition as the modal is pulled down * Enhances UX for mobile users by making dismissal more intuitive
This commit is contained in:
@@ -25,7 +25,7 @@ export const usePullToRefresh = (ref: React.RefObject<HTMLDivElement>, onTrigger
|
||||
const initialX = startEvent.touches[0]!.clientX;
|
||||
const initialY = startEvent.touches[0]!.clientY;
|
||||
|
||||
el.addEventListener('touchmove', handleTouchMove, { passive: false });
|
||||
el.addEventListener('touchmove', handleTouchMove, { passive: true });
|
||||
el.addEventListener('touchend', handleTouchEnd);
|
||||
|
||||
function handleTouchMove(moveEvent: TouchEvent) {
|
||||
|
||||
Reference in New Issue
Block a user