Closed vanderhoop closed 6 months ago
v1.5 introduced major new features along with dispatching a phx:live_reload:attached
function, which exposes a public LiveReloader instance. I think the best approach from here is allowing this instance to support a custom function for triggering a reload, and code in user-land could then store scroll state, trigger browser reload, restore scroll state. I would gladly review a PR that enables such an interface. Thanks!
This pull request adds opt-in scroll restoration after full reloads, as proposed in #144, as this is helpful when working on components or content far below the fold.