content: hardware back button examples never unsubscribe page-scoped handlers
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 78/100
- Loại issue
- Tài liệu
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- javascript, react
- Lĩnh vực
- documentation
Hướng nghiên cứu
Đọc trang về nút quay lại của phần cứng và các ví dụ Angular, Vue và React. Sau đó, so sánh hướng dẫn về vòng đời Angular với trang tương ứng trong versioned_docs/version-v8/. Cập nhật cả hai phiên bản để bổ sung việc dọn dẹp subscription theo phạm vi trang, ngoại lệ AppComponent và lý do chỉ dùng ngOnDestroy là chưa đủ. Hoàn tất khi tất cả ví dụ về framework đều giải thích và minh họa việc dọn dẹp nhất quán.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
URL
https://ionicframework.com/docs/developing/hardware-back-button
Issue Description
The Angular examples on this page call platform.backButton.subscribeWithPriority in a constructor and never unsubscribe. That is fine in AppComponent, but on a routed page the handler outlives the page. A popped page that registered later wins presses over the page on screen, and a page still in the stack takes presses made on the page pushed over it, so navigation never pops. Reported in ionic-team/ionic-framework#31366.
Please add a section on page-scoped handlers that:
- Subscribes in
ionViewDidEnterand unsubscribes inionViewWillLeave, matching the cleanup guidance on the Angular lifecycle page. - Notes that handlers registered in
AppComponentneed no cleanup. - Notes that unsubscribing in
ngOnDestroyalone leaves the handler active while the page sits in the stack under another page.
The Vue and React tabs have the same gap: useBackButton returns unregister, and the React example adds a listener it never removes. Please update versioned_docs/version-v8/ as well.
- Ngôn ngữ chính
- MDX
- Star
- 620
- Fork
- 3.2k
- Merge trung bình
- 14 giờ 27 phút
- Pull request đã merge (30 ngày)
- 46
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/ionic-docs
-
content
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
ionic-team/ionic-docs#4804 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
content: sheet modal docs should explain how to keep interactive content from dragging the sheetĐang mởcontent
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
ionic-team/ionic-docs#4765 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
content
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
ionic-team/ionic-docs#4705 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
content package: angular
Độ khó 2/5 Nửa ngày Mức phù hợp với người mới 78/100
ionic-team/ionic-docs#4702 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
triage
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 80/100
ionic-team/ionic-docs#4546 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của ionic-team/ionic-docs
Issue tương tự
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 70/100
WordPress/Documentation-Issue-Tracker#2540 · 1 bình luận ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
JustAResearcher/gpu-unlock-ada#98 ·
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 82/100
transit-audio/transit#159 ·
-
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 84/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 64/100
ioos/marine_life_data_network#219 ·