Taps hit the wrong location after rotation on iPhone Duo when SwiftUI `Map` fills screen by setting .ignoresSafeArea()
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 48/100
Research direction
Start by reproducing the issue with a full-screen SwiftUI Map using .ignoresSafeArea() on an iPhone Duo, then compare behavior after rotation with .ignoresSafeArea(.all, edges: .vertical). The report names Mapbox 11.33.1 and TapInteraction, but no source files or tests; trace how rotation and safe-area changes affect map gesture hit-testing. Done means taps resolve at the touched feature after rotation and single-finger pans remain pans.
Written by the indexing model from the issue text.
Description
- Device: iPhone Duo.
- iOS: 27.0
- Mapbox 11.33.1
The setup
The SwiftUI Map is used full-screen (.ignoresSafeArea()), edge to edge, under the status bar and home indicator. It makes use of a symbol layer that registers tap using TapInteraction
Swift
MapReader { proxy in
Map(viewport: $viewport) {
// sources / layers
TapInteraction { context in
// select the tapped charger feature
return true
}
}
.presentationTransactionMode(.async)
.ignoresSafeArea()
}
The issue
-
Open the app on an iPhone Duo in any orientation. Tapping features works.
-
Rotate the device.
-
Taps on features now resolve to the wrong place. A tap about one sidebar-width to the right of a feature opens that feature, and tapping the feature itself does nothing. The offset seems to match the width of the system sidebar when it is shown, however I haven't tested this extensively.
-
Rotating back doesn't fix it.
-
Single-finger pans sometimes behave like zoom gestures.
-
The only recovery is to force quit the app.
Removing .ignoresSafeArea() from the Map makes the problem go away.
Hypothesis
On the iPhone Duo the sidebar is reported as a leading safe-area inset. With .ignoresSafeArea() the map view extends underneath the sidebar. After rotation, the safe-area insets seem to change, but the map's frame or origin used for gesture and feature hit-testing is not updated. Taps are then resolved at points shifted by roughly the sidebar's width. We have not confirmed this in the SDK.
Trying out .ignoresSafeArea(.all, edges: .vertical), seems to fix the issue which suggests that it is caused by the sidebar.
Expected: Taps resolve at the touched point, independent of safe-area or sidebar changes.
Actual: Taps resolve offset by about the sidebar width after rotation.
- Dominant language
- Swift
- Stars
- 601
- Forks
- 198
- PR merge metrics
- No merged PRs in 30d
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from mapbox/mapbox-maps-ios
-
auto-triaged bug :beetle: p2
Difficulty 4/5 3-5 days Newbie friendliness 42/100
mapbox/mapbox-maps-ios#2451 ·
-
auto-triaged bug :beetle: needs info p3 performance :zap:
Difficulty 5/5 Over a week Newbie friendliness 22/100
mapbox/mapbox-maps-ios#2450 · 1 comment ·
-
auto-triaged bug :beetle: p1
Difficulty 4/5 3-5 days Newbie friendliness 35/100
mapbox/mapbox-maps-ios#2449 · 4 comments ·
-
auto-triaged bug :beetle: p2
Difficulty 3/5 1-2 days Newbie friendliness 55/100
mapbox/mapbox-maps-ios#2448 ·
-
auto-triaged bug :beetle: p2 performance :zap:
Difficulty 3/5 1-2 days Newbie friendliness 69/100
mapbox/mapbox-maps-ios#2447 ·
All issues in mapbox/mapbox-maps-ios
Similar issues
-
Seed a JRNYAx price before the last close so asset-detail S1.3 doesn't fail from 08:00Z to the openOpenbug tests
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
lognorman20/monaco#7231 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 5 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Provenance-Emu/SkinKit#42 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
lwouis/alt-tab-macos#6154 ·
-
bug mac アプリ: コード アプリ: チャット 優先: 中 要トリアージ
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
yksr-melt/Meltype#1346 · 2 comments ·
Maintainers usually reply within 1 day