Retain last scroll position and selected widget when going back to screens or blocks from an action
13
Views
1
Comments
New
Service Studio

Hello,

Please provide a way to retain the last scroll position and selected widget when going back to screens or blocks from an action.

I have been developing for most of the time and just recently cannot ignore this inconvenience of scrolling back and forth from the widget position on the screen specially when the screen or block has a huge amount of content that needs to be scrolled to get to the widget you want to update.

By default, after going back from the screen or blocks the scroll position just resets at the top.

what do you mean exactly with 'from an action'

  1. no screen flow but for example refreshing the list that you have scrolled down in ?
  2. flowing to current screen at end of action ?
  3. going to another (detail) screen and coming back with flow to previous ?
  4. going to another (detail) screen and coming back with explicit flow ?
  5. going to another (detail) screen and coming back with the browser back button ?
  6. all of the above ?

a.f.a.i.k. for options 1, 3 and 5, you don't get automatically thrown back to the top of the page.

For the cases 2 and 4, where you do get thrown back to the top, by design, if this is really not what you want, have you looked at remembering the position (maybe as a client variable) and get back to it with 'scrollToElement' ?

My advice would be to try and end up in options 1 or 3 and not go against the design for options 2 or 4, as that brings a whole lot of extra management, for example, how do you make sure this 'i want to scroll back to THIS position' doesn't outlive it's intended lifespan, and the user gets pushed down to a lower element on the page hours later because a previous interaction didn't conclude as designed and there is a lingering 'scrollToHere' variable.