Fix Page Scrolling Behavior After Closing Algolia Search Bar - #6957
Fix Page Scrolling Behavior After Closing Algolia Search Bar#6957sreenath-here wants to merge 1 commit into
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Size changesDetails📦 Next.js Bundle Analysis for react-devThis analysis was generated by the Next.js Bundle Analysis action. 🤖 Five Pages Changed SizeThe following pages changed size from the code in this PR compared to its base branch:
DetailsOnly the gzipped size is provided here based on an expert tip. First Load is the size of the global bundle plus the bundle for the individual page. If a user were to show up to your website and land on a given page, the first load size represents the amount of javascript that user would need to download. If Any third party scripts you have added directly to your app using the Next to the size is how much the size has increased or decreased compared with the base branch of this PR. If this percentage has increased by 10% or more, there will be a red status indicator applied, indicating that special attention should be given to this. |
| title: React Blog | ||
| author: React | ||
| date: 16-6-2024 | ||
| description: "React official updates blog" |
There was a problem hiding this comment.
Added these "author, date, description" as I am getting runtime error from rss feed.
Screenshots:Before: Algolia.Before.mp4After: Algolia.after.mp4 |
Description:
This pull request addresses an issue where the website would scroll back to the top of the page after closing the Algolia search bar, regardless of the user's initial position on the page.
Issue:
Whenever the Algolia search bar is activated or clicked, and then subsequently closed, the page scrolls back to the top. This disrupts the user's experience, especially if they were in the middle of reading content further down the page.
Solution:
The following changes were made to resolve this issue:
Changes:
Testing:
Tested on multiple pages to ensure the scroll position is correctly maintained after closing the search bar.
Verified that the fix does not introduce any new issues or regressions.