Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 fix(PageStack): GoBackToPageAndReplace has subtle issues #2316

Merged
merged 2 commits into from
Jan 17, 2025

Conversation

capdiem
Copy link
Contributor

@capdiem capdiem commented Jan 17, 2025

简单来说就是history.go调用和内部pages维护堆栈的执行顺序没按预期发生。现在改为,popstate里执行维护堆栈的逻辑,就确保了先执行history.go调用跳转。

@capdiem capdiem requested a review from Copilot January 17, 2025 07:22
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

Comments suppressed due to low confidence (2)

src/Masa.Blazor/Presets/PageStack/PPageStack.razor.cs:144

  • Ensure that the DelayForPageClosingAnimation constant is defined and used correctly.
await Task.Delay(DelayForPageClosingAnimation);

src/Masa.Blazor/Presets/PageStack/PPageStack.razor.cs:263

  • Review the async handling in the InternalStackStackNavManagerOnStackClear method to ensure it is handled properly.
_ = Js.InvokeVoidAsync(JsInteropConstants.HistoryGo, -Pages.Count);

src/Masa.Blazor/Presets/PageStack/PPageStack.razor.cs Outdated Show resolved Hide resolved
@Qinyouzeng Qinyouzeng merged commit 347ac13 into main Jan 17, 2025
1 check passed
@Qinyouzeng Qinyouzeng deleted the bugfix/page-stack-goback-and-replace branch January 17, 2025 07:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants