bug: blank screen when interrupting tab navigation

未關閉
#30,494 1 則留言 3 個 reaction 已指派 0 人 在 GitHub 檢視

維護者通常 1 天內回覆

還沒有人認領這個 Issue。

評估

難度
4/5
預估耗時
3-5 天
新手友好度
35/100
Issue 類型
缺陷
描述清晰度
基本清楚
活躍度
停滯
技術堆疊
angular, typescript
領域
frontend

研究方向

從 src/app/tab1/tab1.page.ts 中的 StackBlitz reproduction 開始,並依照 issue 中描述的 tab 與 child-route 導覽進行追蹤。在切換 tab 之前重現被中斷的 swipe,接著追蹤受影響 tab 的 ion-hidden 狀態。在導覽被中斷期間切換 tab 時,能一致地顯示正確頁面而不是空白畫面,即表示完成。

由索引模型根據 Issue 內容生成。

描述

triage
Prerequisites
Ionic Framework Version

v8.x

Current Behavior

Hi,

when a navigation inside a tab from a child back to its parent (e.g. Tab1 with a child-route /tabs/tab1/details back to /tabs/tab1) is interrupted mid-navigation, e.g. when a user slowly swipes to the right to close the details and before finishing the swipe this user clicks on another tab (Tab2) Tab2's ion-hidden class is not removed and a blank screen is shown.

Expected Behavior

Navigation should happen as usual and show the correct page

Steps to Reproduce

I provided a StackBlitz based on the tabs starter:
https://stackblitz.com/edit/stackblitz-starters-bcsmo9zw?file=src%2Fapp%2Ftab1%2Ftab1.page.ts

  • open Tab 1
  • click the ion item to navigate to the details
  • slowly swipe fully to the right
  • while dragging, hover over the Tab 3 button
  • release and click before the animation finishes

This is easier done on mobile with two fingers

https://github.com/user-attachments/assets/310efe8f-8a82-4deb-8f2d-f3e532f062bd

Code Reproduction URL

https://stackblitz.com/edit/stackblitz-starters-bcsmo9zw?file=src%2Fapp%2Ftab1%2Ftab1.page.ts

Ionic Info

Ionic:

Ionic CLI : 7.2.0
Ionic Framework : @ionic/angular 8.6.1
@angular-devkit/build-angular : 19.2.15
@angular-devkit/schematics : not installed
@angular/cli : 19.2.15
@ionic/angular-toolkit : 12.2.0

Capacitor:

Capacitor CLI : 7.3.0
@capacitor/android : not installed
@capacitor/core : 7.3.0
@capacitor/ios : not installed

Utility:

cordova-res : not installed globally
native-run : not installed globally

System:

NodeJS : v22.16.0
npm : 10.9.2
OS : macOS Unknown

Additional Information

No response

主要語言
TypeScript
星號
52.8k
分支
13.3k
平均合併
3 天 1 小時
30 天內合併 PR
86

環境準備

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

ionic-team/ionic-framework 的其他 Issue

查看 ionic-team/ionic-framework 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。