inertia-laravel icon indicating copy to clipboard operation
inertia-laravel copied to clipboard

Scroll position is always preserved in reactjs

Open truejay opened this issue 2 years ago • 1 comments

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

truejay avatar Aug 11 '22 06:08 truejay

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

RobertBoes avatar Aug 11 '22 10:08 RobertBoes

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!

jessarcher avatar Sep 08 '23 01:09 jessarcher