rrweb icon indicating copy to clipboard operation
rrweb copied to clipboard

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

Open richard-misiak-az opened this issue 1 year ago • 2 comments

Preflight Checklist

  • [X] 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

richard-misiak-az avatar May 09 '24 13:05 richard-misiak-az

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

richard-misiak-az avatar May 09 '24 13:05 richard-misiak-az

Still present as of alpha 15

richard-misiak-az avatar Jun 14 '24 08:06 richard-misiak-az