egjs-persist icon indicating copy to clipboard operation
egjs-persist copied to clipboard

How about process `scrollRestoration` property in Persist?

Open sculove opened this issue 8 years ago • 0 comments

@sculove commented on Thu Dec 29 2016

Description

The persist create the virtual bfcache (?). When history back, the scroll position is moved by browser like chrome. How about control scrollRestoration property?

if ('scrollRestoration' in history) {
  // Back off, browser, I got this...
  history.scrollRestoration = 'manual';
}

@netil commented on Wed Jan 04 2017

  • Pros: Don't intervene programmatically scroll action.
  • Cons: If restoration is set to manual, it means need to implement scroll restoration programmatically.

@sculove commented on Wed Jan 04 2017

I think if you are using persist, it will be the user who will want to control the scrolling


@netil commented on Wed Jan 04 2017

But, in other word it's unnecessary handle scroll (for that it should check exact restoration happening natively)

sculove avatar Aug 03 '17 04:08 sculove