bug: vue swipe cancellation throws when the previous page is missing
Maintainer antworten meist innerhalb von 1 Tag
Bewertung
- Schwierigkeit
- 2/5
- Geschätzter Aufwand
- 1-3 Stunden
- Anfängerfreundlichkeit
- 78/100
- Issue-Typ
- Bug
- Klarheit
- Klar beschrieben
- Aktivitätsstatus
- Aktiv
- Tech-Stack
- javascript, typescript
- Bereich
- frontend, mobile-dev
Rechercherichtung
Beginne im Abbruchzweig von Ionic Vue IonRouterOutlet bei swipeHandler.onEnd(false), insbesondere bei der Suche über findViewItemByRouteInfo. Führe die eigenständige Reproduktion mit npm install und npm run dev aus und prüfe anschließend die beschriebene Regressionstestabdeckung für fehlende Views, nicht gemountete Seiten, normale Abbrüche, abgeschlossene Swipes und späte Abbrüche. Erledigt ist die Änderung, wenn der Abbruch ohne eine zuvor gemountete Seite sicher ist und die vorhandene Bereinigung sowie abgeschlossene Swipes weiterhin funktionieren.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
Prerequisites
- I have read the contributing guidelines and code of conduct.
- I have searched existing issues for this problem.
Ionic Framework Version
v9.x
Current Behavior
Ionic Vue's IonRouterOutlet cancellation branch (swipeHandler.onEnd(false)) unconditionally dereferences the view returned by findViewItemByRouteInfo and its ionPageElement.
If the callback runs after navigation has returned to a root route, there may be no previous view in that outlet. The callback throws:
TypeError: Cannot read properties of undefined (reading 'ionPageElement')
The same branch also throws if a view record exists but its page has been unmounted. This was observed in an iOS app using 9.0.3, with the stack pointing to the cancelled-animation callback in the core router outlet. The unguarded code is still present on main at 643584b3ac2ba1ca263cbf53960ccde3be2a96fc (9.0.6).
Expected Behavior
Cancellation should safely do nothing if there is no previous mounted page to hide. When the page exists, cancellation should continue setting aria-hidden="true" and ion-page-hidden. Completed swipes should continue navigating back.
Steps to Reproduce
- Download the four files in the reproduction gist into one directory.
- Run
npm installandnpm run devwith a supported Node version. - Open the displayed local URL and click Reproduce.
- Observe the TypeError in the page and console.
The reproduction uses the real Ionic Vue router and outlet. It pushes a second page, checks canStart(), returns to the first page, then explicitly delivers onEnd(false) to model a late cancellation callback. This is a deterministic callback-level reproduction, not a claim to reproduce the physical touch/animation race. There are no mocked view stacks or routers.
Code Reproduction URL
https://gist.github.com/dandoingdev/d7a6e044bf006bdb633aa32aaeffd410
Environment
Standalone reproduction: @ionic/vue 9.0.6, @ionic/vue-router 9.0.6, Vue 3.5.42, Vue Router 5.3.1, Vite 8.3.0. Confirmed in headless Chrome on macOS. No Ionic CLI or Capacitor is needed for the deterministic reproduction.
Additional Information
I have prepared a small guard for the missing view/page and regression tests, and will link the PR here. Tests cover missing views, unmounted pages, normal cancellation cleanup, completed swipes, and late cancellation after returning to the root using the real router.
- Vorherrschende Sprache
- TypeScript
- Sterne
- 52.7k
- Forks
- 13.3k
- Ø Merge
- 2 T. 3 Std.
- Gemergte PRs (30 T.)
- 70
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Hat eine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus ionic-team/ionic-framework
-
bug: ion-searchbar input is always labelled "search text"; aria-label on the host is not forwardedEvtl. vergeben @HappyKnuckles hat das vor 2 Tagen übernommen. Offentriage
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 84/100
ionic-team/ionic-framework#31492 ·
Maintainer antworten meist innerhalb von 1 Tag
-
bug: IonTabs throws when a Fragment contains one IonRouterOutletEvtl. vergeben @Benziza hat das vor 43 Tagen übernommen. Offentriage
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
ionic-team/ionic-framework#31410 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
triage
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
ionic-team/ionic-framework#31314 ·
Maintainer antworten meist innerhalb von 1 Tag
-
triage
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 86/100
ionic-team/ionic-framework#31291 ·
Maintainer antworten meist innerhalb von 1 Tag
-
triage
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 70/100
ionic-team/ionic-framework#30738 ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in ionic-team/ionic-framework
Ähnliche Issues
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 85/100
MystenLabs/MemWal#1163 · 2 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag
-
Mondriaan
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 88/100
knaw-huc/textannoviz#709 ·
Maintainer antworten meist innerhalb von 1 Tag
-
billion-context-pi
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 62/100
ranxianglei/billion-context#2521 · 3 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag
-
Add: YRF Music NepalOffenstreams:add
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 62/100
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100