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(openchallenges): expore Location.replaceState() to fix scrolling issue #2268

Closed

Conversation

tschaffter
Copy link
Member

@tschaffter tschaffter commented Oct 24, 2023

Closes #2154

Description

Explore an alternative solution to #2189 that may be simpler.

Angular's Location service should be used when interacting with the browser's URL and not for routing. Thats why we want to use Location service.

Source

References

@tschaffter tschaffter self-assigned this Oct 24, 2023
@tschaffter tschaffter changed the title fix(openchallenges): Expore Location.replaceState() to fix scrolling issue fix(openchallenges): expore Location.replaceState() to fix scrolling issue Oct 24, 2023
@tschaffter
Copy link
Member Author

tschaffter commented Oct 24, 2023

@rrchai I was wondering whether there was a simpler solution to the scrolling issue. I may have found one (see above). It seems that the existing code relies on on page navigation to trigger new searches. A more performant approach aligned with this PR would be to trigger queries when the object this.query changes. What do you think?

@rrchai
Copy link
Contributor

rrchai commented Oct 26, 2023

@tschaffter Thanks for the initial exploration of replaceState(). The changes based on your codes will be tracked in #2273 .

@tschaffter
Copy link
Member Author

See comment from Rong above. Closing this exploratory PR.

@tschaffter tschaffter closed this Oct 26, 2023
@tschaffter tschaffter deleted the ignore-route-updates branch July 22, 2024 13:17
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.

[Bug] Reset scrolling position when navigating to another page (Take 2)
2 participants