Skip to content

fix(map): support fullscreen on iOS Safari - #70

Draft
km-git007 wants to merge 11 commits into
AnmolSaini16:mainfrom
km-git007:fix/ios-fullscreen
Draft

fix(map): support fullscreen on iOS Safari#70
km-git007 wants to merge 11 commits into
AnmolSaini16:mainfrom
km-git007:fix/ios-fullscreen

Conversation

@km-git007

Copy link
Copy Markdown

fix(map): support fullscreen on iOS Safari

Goal

Adds a reliable fullscreen toggle for map controls, including browsers without the standard Fullscreen API.

Fixes #51.

What changed

  • Fullscreen entry prefers the standards API, then the WebKit-prefixed API, then MapLibre's pseudo-fullscreen CSS fallback.
  • The control stays synchronized and accessible as native fullscreen changes, and preserves fullscreen state through control child remounts/style replacement.
  • Pseudo-fullscreen restores the exact prior body.style.overflow when maps are destroyed, and keeps the body locked until the final pseudo-fullscreen owner exits when multiple maps are active.
  • Fullscreen transitions schedule safe map resizes and cancel pending resize work on removal.

Scope

No public props, dependencies, custom fullscreen CSS, or unrelated refactors were added.

Stack

Depends on #69. This branch starts from PR #69's head; once #69 merges, the effective diff is only this fullscreen commit.

Validation

  • Desktop Chromium: direct local-style harness covered CSS fallback enter/exit/Escape, viewport fill, accessible label and aria-pressed, rejection fallback, pending transition locking, remount/style replacement, map destruction cleanup, multi-map ownership, and removal before scheduled resize. The follow-up harness also verified topmost multi-map Escape, Escape after the first map's controls unmounted, and duplicate-control label/aria-pressed synchronization.
  • Playwright WebKit with iPhone 15-like emulation: the engine exposed no element fullscreen APIs, so the standards/WebKit calls and native-change synchronization were exercised with a page-level shim; this is mocked API coverage, not device Safari validation.
  • Chromium with Pixel 7-like emulation: CSS fallback entered/exited and the map canvas remained interactive through a wheel gesture.
  • Docs /docs/controls: preview mounted; dark/light toggles retained the map and fullscreen control.
  • Static/touched checks: touched-file ESLint (src/registry/map.tsx and both modified docs pages), tsc --noEmit --incremental false, production build, deterministic registry rebuild comparison, and diff checks passed.

Physical iPhone Safari validation: pending.

This should remain a draft while the dependency and physical-device validation are pending.

km-git007 added 11 commits July 17, 2026 17:34
Key declarative layers on styleEpoch so theme style swaps recreate
sources through one shared lifecycle hook, not style.load/pendingStyle.
Close the ready gate during style swaps, omit invalid route dasharrays,
and keep shell listeners keyed to the same lifecycle revision.
Keep styleEpoch readiness and useMapLayers; bring in data-theme
detection, public prop type exports, and homepage/style cleanups.
Drop redundant lifecycle helpers and leaner layer create/sync paths
without touching the proven style readiness owner.
Make the styleEpoch docs snippet valid TypeScript so it is safer to copy.
Mount map children only when style-ready, sync handler refs after
commit, and fall back to system theme when the document theme clears.
Bind GeoJSON/Arc handlers from effect closures like MapRoute so we do
not need a render-time ref write or a syncing useEffect.
Bring in control transition and animation timing tweaks from main.
Always wrap hoverPaint overrides in a case expression so keys absent
from the base paint do not apply to every feature.
@vercel

vercel Bot commented Jul 17, 2026

Copy link
Copy Markdown

@km-git007 is attempting to deploy a commit to the mapcn oss program Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai

coderabbitai Bot commented Jul 17, 2026

Copy link
Copy Markdown

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 8a79a6ab-015b-4b98-98b2-ac108c8a408a

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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.

[Bug] Fullscreen mode not working on Safari iOS (iPhone)

1 participant