bug: angular: navigations that overlap a page transition can leave two pages visible
Mantenedores costumam responder em até 1 dia
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 4/5
- Tempo estimado
- 3-5 dias
- Facilidade para iniciantes
- 35/100
- Tipo de issue
- Bug
- Clareza
- Razoavelmente clara
- Status de atividade
- Ativa
- Stack de tecnologia
- angular, typescript
- Domínio
- frontend
Direção de pesquisa
Start in common/directives/navigation/stack-controller.ts, reading StackController.wait() and how runningTask is set and cleared; the issue already suggests tasks can resume concurrently via promise.finally(). Reproduce with the provided zoneless Angular app and the 8-navigation burst driver, checking visible .ion-page elements after settling. Done means overlapping navigations always settle with exactly one visible page matching the current URL, verified across repeated bursts.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
Ionic Framework Version
v9.x (9.0.9)
Current Behavior
When router navigations follow each other faster than the page transition — a navigation starts while the previous transition is still animating — the outlet sometimes settles with two .ion-page elements displayed: the page for the current URL and a page from an earlier navigation.
In a headless Chromium run of the reproduction below (iOS mode, default transitions), 5 of 40 bursts of 8 navigations, 30–330 ms apart, ended with two pages visible.
From reading StackController.wait() (common/directives/navigation/stack-controller.ts): every task waiting on runningTask resumes at the same moment once it settles, and promise.finally(() => (this.runningTask = undefined)) can clear the slot while a later task is still running, so queued transitions can run at the same time rather than one after another. That does not seem to be the only path: with wait() changed locally to chain tasks strictly, 1 of 40 bursts still failed.
Expected Behavior
Once navigations settle, exactly one page is visible: the one for the current URL.
Steps to Reproduce
- A standalone Angular app with
provideIonicAngular({ mode: 'ios' }), an<ion-router-outlet>and three sibling routesa,b,c, each a component with an<ion-content>. - Call
router.navigateByUrl()8 times in a row to random routes among the three, 30–330 ms apart. - Wait ~3 s and count the
ion-router-outlet > .ion-pageelements that are displayed with non-zero opacity.
const page = (name: string) => {
@Component({ selector: `page-${name}`, template: `<ion-content>${name}</ion-content>`, imports: [IonContent] })
class P {}
return P;
};
@Component({ selector: 'app-root', template: '<ion-app><ion-router-outlet /></ion-app>', imports: [IonApp, IonRouterOutlet] })
class Root {}
bootstrapApplication(Root, {
providers: [
provideZonelessChangeDetection(),
provideIonicAngular({ mode: 'ios' }),
provideRouter([
{ path: 'a', component: page('a') },
{ path: 'b', component: page('b') },
{ path: 'c', component: page('c') },
{ path: '', redirectTo: 'a', pathMatch: 'full' },
]),
],
});
// Driver: navigate 8 times to random routes, 30–330 ms apart, then after ~3 s:
const visible = [...document.querySelectorAll('ion-router-outlet > .ion-page')]
.filter((p) => getComputedStyle(p).display !== 'none' && +getComputedStyle(p).opacity > 0);
// Expected visible.length === 1; observed 2 in about 1 of 8 bursts.
Code Reproduction URL
Inline above.
Ionic Info
@ionic/angular 9.0.9, @ionic/core 9.0.9, @angular/core 22.2.3 (zoneless), Chromium via Playwright.
Additional Information
In our app this showed up as tab switches settling on a page that was not the tab in the URL after fast taps.
- Linguagem predominante
- TypeScript
- Estrelas
- 52.7k
- Forks
- 13.3k
- Merge médio
- 2d 21h
- PRs com merge (30d)
- 65
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á 9 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: vue swipe cancellation throws when the previous page is missingTalvez já em andamento @dandoingdev assumiu há 32 dias. Abertapackage: vue type: bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
ionic-team/ionic-framework#31514 · 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á 27 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á 68 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
Todas as issues de ionic-team/ionic-framework
Issues semelhantes
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 75/100
Mantenedores costumam responder em até 1 dia
-
Broken links in the docsAberta
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 83/100
Mantenedores costumam responder em até 1 dia
-
🔊 a11y
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 82/100
betagouv/mon-entreprise#4726 ·
Mantenedores costumam responder em até 9 dias
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
Deltares/fews-pi-requests#357 ·
Mantenedores costumam responder em até 1 dia
-
bug confirmed js v6
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 85/100
Mantenedores costumam responder em até 1 dia