infinite-ajax-scroll icon indicating copy to clipboard operation
infinite-ajax-scroll copied to clipboard

Feature scroll position tracking to improve back button

Open fieg opened this issue 5 years ago • 5 comments

Description
Currently the back button logic works based on an updated url in history. This way when you press the back button, you land on the previous page. In most situations the browser keeps track of scroll position and takes you to the correct spot. In other situations or browsers this doesn't seem to work.

In this feature I would like to explore if it's possible to track scroll position and page dimensions and store that information in localstorage and use that to bring the user to the right scroll position.

Related issue(s): #273

fieg avatar Mar 02 '20 11:03 fieg

Hello

Any news about this? I think its quite critical functionality.

Regards John

zissop avatar May 20 '20 15:05 zissop

Hi John, Thanks for asking. I see you think this is critical. Did you ran into a situation where the current back behavior didn't work as expected? I currently have this on the roadmap for v3.1 but if you have good reasons I'm willing to move this up in priority.

fieg avatar May 25 '20 15:05 fieg

Sorry for late response. Actually i never found a case the back button is working as expected. You have to save scroll position and then do various things to be sure that when use presses back it will land on the same spot. And even then browser may scroll down and never return to the correct spot. I tried the same approach as you will use and have 90% success. Maybe i do something not optimal.

zissop avatar Jun 06 '20 16:06 zissop

Привет Джон, спасибо за вопрос. Я вижу, вы думаете, что это важно. Вы столкнулись с ситуацией, когда текущее поведение назад не сработало, как ожидалось? В настоящее время у меня есть это в дорожной карте для v3.1, но если у вас есть веские причины, я готов переместить это в приоритет.

Hi John, Thanks for asking. I see you think this is critical. Did you ran into a situation where the current back behavior didn't work as expected? I currently have this on the roadmap for v3.1 but if you have good reasons I'm willing to move this up in priority.

This is a very necessary option !!!

denysdesign avatar Jun 28 '20 17:06 denysdesign

Vote for this issue as well. According to our browser stack tests some devices seem not to work ok with back button after you have visited a page and you have pressed load more (changed page) at least once. I found out this really order topic btw https://tumbledry.org/2011/05/12/screw_hashbangs_building regarding some ideas. Btw we are already in 3.1.0 is there any update. i din't notice anything in the changelog.

AlexanderSk avatar May 30 '23 06:05 AlexanderSk