fix: replace UA-based mobile detection with viewport size checks for workspace modal#5132
Open
elevatingcreativity wants to merge 1 commit intoMintplex-Labs:masterfrom
Conversation
…orkspace modal - Replace isMobile (react-device-detect) with window.innerWidth/innerHeight checks so "Request Desktop Site" on iPad is respected - Block modal when viewport < 560px wide OR < 600px tall, covering phones in both portrait and landscape while allowing tablets - Remove md: prefix from overflow-y-auto so modal scrolls correctly on iPad mini in portrait mode (744px wide, below the 768px md breakpoint) - Add onTouchEnd handler to upload button in sidebar to fix iOS double-tap issue caused by button being a descendant of an anchor element - Update blocking message to accurately describe screen width requirement rather than incorrectly stating desktop-only Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.
Summary
isMobilefromreact-device-detect(user-agent based) withwindow.innerWidth < 560 || window.innerHeight < 600so that "Request Desktop Site" on iPad is correctly respectedmd:prefix fromoverflow-y-autoon the modal container so scrolling works on iPad mini in portrait mode (744px wide, which falls below the 768pxmdbreakpoint)onTouchEndhandler to the workspace upload button in the sidebar to fix an iOS double-tap issue caused by the button being a descendant of an<a>elementMotivation
Fixes #5055 — on iPadOS, "Request Desktop Site" was ignored because
isMobilefromreact-device-detectuses the user agent string, which does not reliably change when requesting desktop mode. The fix uses actual viewport dimensions, which do reflect the rendered layout regardless of user agent.Test plan
🤖 Generated with Claude Code