inertia-laravel
inertia-laravel copied to clipboard
Scroll position is always preserved in reactjs
When navigating from one page to another, scroll position is always preserved. Applies to Inertiajs + Reactjs combo only.
See example here: https://pingcrm-react.herokuapp.com/
Source code: https://github.com/Landish/pingcrm-react
The issue on that example is that the body/document doesn't scroll, but rather an element within the page that scrolls. So you'd have to define a scroll region on the appropriate element. This means you'd have to add a scroll region here: https://github.com/Landish/pingcrm-react/blob/main/resources/js/Shared/Layout.js#L21
Hi there,
Thanks for reporting the problem you are encountering, but it looks like this is a question that may be better suited for a support channel. We only use this issue tracker for reporting bugs with the library itself. If you have a question on how to use the functionality provided by this repository, you can try one of the following channels:
However, this issue will not be locked, and everyone is free to discuss solutions to your problem!