Skip to content

Feat/169 mobile gesture fix#212

Merged
RUKAYAT-CODER merged 2 commits into
rinafcode:mainfrom
Chrisbankz0:feat/169-mobile-gesture-fix
Apr 26, 2026
Merged

Feat/169 mobile gesture fix#212
RUKAYAT-CODER merged 2 commits into
rinafcode:mainfrom
Chrisbankz0:feat/169-mobile-gesture-fix

Conversation

@Chrisbankz0
Copy link
Copy Markdown

#closes #169

Description This PR resolves the ongoing gesture conflicts between our custom mobile swipe handlers and native iOS browser navigation gestures (e.g., swipe-to-go-back/forward in Safari).

It introduces browser detection for iOS devices and automatically defaults to disabling custom swipe gestures on those devices, thereby preserving native browser navigation. Additionally, a dynamic toggle UI powered by lucide-react icons has been implemented, granting users explicit control to enable or disable custom gestures when needed.

Changes Included

Added browser user-agent detection to accurately identify iOS and iPadOS environments.
Automatically disabled custom useMobileGestures default behavior for iOS devices to prevent native swipe-to-navigate conflict.
Implemented a floating, intuitive toggle button (using Tailwind CSS) allowing users to switch custom gestures on or off.
Used ToggleLeft and ToggleRight from lucide-react within the toggle button to adhere to design consistency rules.
Set touchAction to dynamically switch between pan-y and auto based on the gesture enablement state.

Checklist:

Feature aligns with roadmap/issue description.
UI is working as expected with no console errors.
Used lucide-react icons for consistent usage throughout the app.
Styled utilizing Tailwind CSS with a responsive/accessible design.
Tested locally via iOS simulation.
Testing Instructions for Reviewers:

Checkout this branch and run npm run dev.
Open the application using an iOS device, or emulate an iOS device using Chrome DevTools (ensure you refresh the page after toggling device emulation).
Verify that the "Gestures Off" toggle is visible in the top right corner of gesture-enabled areas.
Try a left-to-right swipe along the edge. The native browser back action should trigger without conflict.
Tap the toggle to switch to "Gestures On". Swiping should now successfully fire the app's custom gesture events instead of the native action.

#closes

@drips-wave
Copy link
Copy Markdown

drips-wave Bot commented Apr 25, 2026

@Chrisbankz0 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@RUKAYAT-CODER RUKAYAT-CODER merged commit cf063b0 into rinafcode:main Apr 26, 2026
1 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Mobile Gesture Conflicts

2 participants