rrweb-io / rrweb

record and replay the web

Home Page:https://www.rrweb.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Bug]: Seeking within player doesn't correctly handle scrolling

richard-misiak-az opened this issue · comments

Preflight Checklist

  • I have searched the issue tracker for a bug report that matches the one I want to file, without success.

What package is this bug report for?

rrweb

Version

2.0.0-alpha.13

Expected Behavior

When seeking within the player for events that include page scrolling the replay should work correctly when seeking

Actual Behavior

When seeking through events that include scrolling the scrolling does not appear to be correctly reset meaning that the elements in the replay are now out of sync with the viewport position

Steps to Reproduce

  1. Go to the testcase below, it includes some interaction with fields and scrolling
  2. Let the events play
  3. using the player controls jump to ~4s
  4. jump back to ~1s
  5. resume the player

What it should look like:
image

However while seeking the scroll events aren't undone meaning the viewport is in the wrong position on the page meaning you see this instead:
image

Testcase Gist URL

https://rrwebdebug.com/play/index.html?url=https%3A%2F%2Fgist.github.com%2Frichard-misiak-az%2F7c5f1bfa491d9f7387c7bb51edbe2cd8&version=2.0.0-alpha.12&virtual-dom=on&play=on

Additional Information

No response

I've done some further testing with the debugger and 0.7.14 (rrweb v1.1.3) does not have this issue, but all later alpha versions do so I guess it's related to the rewrite of the replayer logic

Still present as of alpha 15