@capacitor/screen-orientation: iOS: orientation() and screenOrientationChange event report orientation change although orientation is locked
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
- 45/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Ít trao đổi
- Công nghệ
- ios, swift, typescript
- Lĩnh vực
- mobile
Hướng nghiên cứu
Tái hiện vấn đề trên iOS bằng @capacitor/[email protected], bắt đầu với các entry point ScreenOrientation.lock(), orientation() và screenOrientationChange được mô tả ở đây. So sánh các giá trị được báo cáo sau khi khóa ở portrait-primary và xoay thiết bị; được xem là hoàn tất khi listener và orientation() phản ánh hướng màn hình đã khóa mà không thay đổi hành vi Android đã được ghi chép.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Bug Report
Plugin(s)
@capacitor/[email protected]
Capacitor Version
💊 Capacitor Doctor 💊
Latest Dependencies:
@capacitor/cli: 4.7.0
@capacitor/core: 4.7.0
@capacitor/android: 4.7.0
@capacitor/ios: 4.7.0
Installed Dependencies:
@capacitor/core: 4.7.0
@capacitor/cli: 4.7.0
@capacitor/ios: 4.7.0
@capacitor/android: 4.7.0
[success] iOS looking great! 👌
Platform(s)
- iOS
Current Behavior
After locking the orientation
await ScreenOrientation.lock({orientation: "portrait-primary"})
the screenOrientationChange listener still reports changed orientations when the device is rotated as if the orientation was not locked. Calling
const {type} = await ScreenOrientation.orientation()
also returns the orientation as if the screen orientation was not locked.
The document orientation itself is locked correctly though, no matter how the device is rotated.
Expected Behavior
The screenOrientationChange listener should only report changes when the screen orientation is actually changed, not when the device is rotated while the screen orientation is locked. Likewise ScreenOrientation.orientation() should return the correct screen orientation when it is locked, no matter how the device is rotated.
This does not seem to be an issue on Android. There the screenOrientationChange listener gets only called after ScreenOrientation.lock() if it actually changed the screen orientation. ScreenOrientation.orientation() also returns the correct screen orientation after ScreenOrientation.lock() was called.
Code Reproduction
Other Technical Details
Additional Context
- Ngôn ngữ chính
- Java
- Star
- 688
- Fork
- 692
- 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
- Không 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 ionic-team/capacitor-plugins
-
triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
ionic-team/capacitor-plugins#2616 ·
-
[@capacitor/app] iOS: 'Expression implicitly coerced from String? to Any' warning in getAppLanguageĐang mởtriage
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
ionic-team/capacitor-plugins#2604 ·
-
bug(network): Android networkStatusChange re-queries the active network inside callbacks and fires on every capability changeCó thể đã có người làm @kcjonson đã nhận 8 ngày trước. Đang mởplatform: android
Độ khó 4/5 1-2 ngày Mức phù hợp với người mới 25/100
ionic-team/capacitor-plugins#2621 ·
-
bug(network): iOS getStatus() returns the last reachability callback value instead of reading current flagsCó thể đã có người làm @kcjonson đã nhận 8 ngày trước. Đang mởplatform: ios
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 35/100
ionic-team/capacitor-plugins#2620 ·
-
platform: android platform: ios
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 24/100
ionic-team/capacitor-plugins#2619 ·
Tất cả issue của ionic-team/capacitor-plugins
Issue tương tự
-
area: triage theme: undefined
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
jhipster/generator-jhipster#35895 ·
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 78/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
oracle/graalvm-reachability-metadata#11659 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Build failure report and inbox copy miss a proof split by colour codes, which the build log redactsĐang mởbug follow-up
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
Sanne/incus-spawn#1864 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
openhab/openhab-addons#22135 ·
Maintainer thường phản hồi trong vòng 1 ngày