Taps hit the wrong location after rotation on iPhone Duo when SwiftUI `Map` fills screen by setting .ignoresSafeArea()
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 48/100
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
- 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.
- Ngôn ngữ chính
- Swift
- Star
- 601
- Fork
- 198
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của mapbox/mapbox-maps-ios
-
Map elements regression 11.33.xĐang mởauto-triaged bug :beetle: p2
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 42/100
mapbox/mapbox-maps-ios#2451 ·
-
auto-triaged bug :beetle: needs info p3 performance :zap:
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 22/100
mapbox/mapbox-maps-ios#2450 · 1 bình luận ·
-
auto-triaged bug :beetle: p1
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
mapbox/mapbox-maps-ios#2449 · 5 bình luận ·
-
auto-triaged bug :beetle: p2
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 55/100
mapbox/mapbox-maps-ios#2448 ·
-
auto-triaged bug :beetle: p2 performance :zap:
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 69/100
mapbox/mapbox-maps-ios#2447 ·
Tất cả issue của mapbox/mapbox-maps-ios
Issue tương tự
-
🎉 Add BossanovaĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
jaywcjlove/awesome-mac#4096 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
-
[BUG] FluidMeet: Google Meet browser calls not detected after Meet moved rooms to /meet/<code>Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
altic-dev/FluidVoice#1264 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
needs-triage S3: minor
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
manaflow-ai/cmux#28422 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày