Active-CSS / active-css

The epic event-driven browser language for UI with functionality in one-liner CSS. Over 100 incredible CSS commands for DOM manipulation, ajax, reactive variables, single-page application routing, and lots more. Could CSS be the JavaScript framework of the future?
https://activecss.org
Other
43 stars 7 forks source link

@pages SPA handling needs a solution for scroll position #305

Closed bob2517 closed 1 year ago

bob2517 commented 1 year ago

The only thing that ACSS doesn't handle automatically with @pages is remembering the scroll position when going back to a page. This should be implemented as best as possible.

There will be an issue for things like the intentionally delayed rendering of manually drawn lists, or manual page transition routines, but there's not much that can be done about that automatically without remembering the actions taken to get to that scroll point, which wouldn't be desired behaviour, and that issue would be there natively anyway.

To solve that problem too, allow access to fetch the scroll position of that page so that it can be used manually once it has been automatically stored per the first fix needed.

bob2517 commented 1 year ago

Spotted that it already handles scroll position on the docs site, so I think it's to do with a scenario with multiple content areas that I've used on a site for page transition effects. Should still look at this - at least to allow access to the previous scroll position prior to an SPA page navigation for a potential manual handling.

bob2517 commented 1 year ago

Closing - if it's that important the scroll position can be trapped before and reset after manually and it's not come up as an issue.