avoid auto scrolling when intercepting routes

anybody knows a solution for this? scroll={false} won't work for everybody https://github.com/vercel/next.js/discussions/48445
GitHub
Disable scrolling to the top of the page when Intercepting Routes -...
When utilizing the Intercepting Routes feature to create modals, the page scrolls to the top, which is bad to usability. For instance, consider a masonry grid with photos, similar to Instagram'...
4 Replies
webdevkaleem
webdevkaleem3w ago
GitHub
Disable scrolling to the top of the page when Intercepting Routes -...
When utilizing the Intercepting Routes feature to create modals, the page scrolls to the top, which is bad to usability. For instance, consider a masonry grid with photos, similar to Instagram'...
webdevkaleem
webdevkaleem3w ago
Try placing the
{children}
{children}
After the
{modal}
{modal}
Inside your page's layout
webdevkaleem
webdevkaleem3w ago
GitHub
Disable scrolling to the top of the page when Intercepting Routes -...
When utilizing the Intercepting Routes feature to create modals, the page scrolls to the top, which is bad to usability. For instance, consider a masonry grid with photos, similar to Instagram'...
webdevkaleem
webdevkaleem3w ago
Someone made a custom solution for this problem I don't see what else can be done

Did you find this page helpful?