Feat/169 mobile gesture fix#212
Merged
RUKAYAT-CODER merged 2 commits intoApr 26, 2026
Merged
Conversation
added 2 commits
April 25, 2026 23:26
…upport and iOS conflict resolution
|
@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! 🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#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