- ABP Framework version: v7.0
- UI type: Blazor
- DB provider: EF Core
- Tiered (MVC) or Identity Server Separated (Angular): no
- Exception message and stack trace:
- Steps to reproduce the issue:" When open new page, system still keep previous position. I want to it reset page to top, how can I do that?
14 Answer(s)
- 
    0hi You can try to call the javascript function to scroll to the top on LocationChangedevent.https://blazor-university.com/routing/detecting-navigation-events/ https://learn.microsoft.com/en-us/dotnet/api/microsoft.aspnetcore.components.navigationmanager.locationchanged?view=aspnetcore-7.0 
- 
    0Thank you, What is component or page I should overwrite to add this script? I dont know which component will be called when any page loaded 
- 
    0hi You can try to add a Layout-Hooks https://docs.abp.io/en/abp/latest/UI/Blazor/Layout-Hooks 
- 
    0
- 
    0What's your code? 
- 
    0
- 
    0hi Try to rename your class as ScrollToTopComponent
- 
    0Hi, it is same error, I just change name to exact name AnnouncementComponent but not work as well 
- 
    0hi I will test this. 
- 
    0hi Can you share your project? liming.ma@volosoft.com 
- 
    0Yes i just add component and add it to ConfigureServices Please have a look at my change 
- 
    0hi This is an app issue, we will fix the scroll issue in the next patch release. 
- 
    0Thank you, waiting for hearing update from you 
- 
    0We will solve the problem as soon as possible 



 
                                