bug: vue swipe cancellation throws when the previous page is missing
Mantenedores costumam responder em até 1 dia
Avaliação
- Dificuldade
- 2/5
- Tempo estimado
- 1-3 horas
- Facilidade para iniciantes
- 78/100
- Tipo de issue
- Bug
- Clareza
- Claramente especificada
- Status de atividade
- Ativa
- Stack de tecnologia
- javascript, typescript
- Domínio
- frontend, mobile-dev
Direção de pesquisa
Comece no branch de cancelamento de Ionic Vue IonRouterOutlet em swipeHandler.onEnd(false), especialmente na busca por meio de findViewItemByRouteInfo. Execute a reprodução independente com npm install e npm run dev e, em seguida, inspecione a cobertura de regressão descrita para views ausentes, páginas desmontadas, cancelamento normal, swipes concluídos e cancelamento tardio. Está concluído quando o cancelamento é seguro sem uma página montada anteriormente e a limpeza existente e os swipes concluídos continuam funcionando.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
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.
- Linguagem predominante
- TypeScript
- Estrelas
- 52.7k
- Forks
- 13.3k
- Merge médio
- 2d 9h
- PRs com merge (30d)
- 77
Preparar o ambiente
- Sem Dockerfile nem arquivo Docker Compose
- Tem um modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de ionic-team/ionic-framework
-
bug: input-otp, backspace in an empty box only moves focus instead of clearing the previous boxTalvez já em andamento @sarankumar1325 assumiu há 2 dias. Abertapackage: core type: bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 90/100
ionic-team/ionic-framework#31639 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
bug: ion-searchbar input is always labelled "search text"; aria-label on the host is not forwardedTalvez já em andamento @HappyKnuckles assumiu há 19 dias. Abertaa11y package: core type: bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 84/100
ionic-team/ionic-framework#31492 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
bug: IonTabs throws when a Fragment contains one IonRouterOutletTalvez já em andamento @Benziza assumiu há 60 dias. Abertapackage: react type: bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
ionic-team/ionic-framework#31410 · 2 comentários ·
Mantenedores costumam responder em até 1 dia
-
package: angular type: bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 86/100
ionic-team/ionic-framework#31291 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
bug: ion-range: Clicking/Tapping on the Last tick doesn't workTalvez já em andamento @RaphaelFakhri assumiu há 2 dias. Abertatriage
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 70/100
ionic-team/ionic-framework#30738 ·
Mantenedores costumam responder em até 1 dia
Todas as issues de ionic-team/ionic-framework
Issues semelhantes
-
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 82/100
Mantenedores costumam responder em até 1 dia
-
bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 82/100
juice-shop/juice-shop#3706 ·
Mantenedores costumam responder em até 1 dia
-
sbx up from a subfolder silently pushes the whole work treeTalvez já em andamento @pdettori assumiu hoje. Abertaenhancement
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 76/100
Mantenedores costumam responder em até 1 dia
-
bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
outline/outline#14348 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
bug needs-triage
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
Mantenedores costumam responder em até 1 dia