Reproduces: on iPad, exiting fullscreen on a video scrolls the page back to the top.
The page reports the surrogate's own scroll position, so a snap shows even when the
client looks fine.
Tap Go to player (or open with ?autoscroll=1), so the page is scrolled to about 3500 px.
Make sure the video is playing (it starts muted by itself; check the panel for video playing),
then tap Fullscreen: wrapper or Fullscreen: video, then Allow in the SafeView prompt.
A playing video is expected to make the iPad show two native buttons (X and minimize), as on glassdoor.
Exit in one of two ways (they take different paths, and the bug depends on which one is used):
Client route: the iPad's own X at the top-left of the fullscreen screen (the browser's native minimize).
Page route: the big Minimize (page JS) button at the top-right (or the one in the bottom bar), which exits from the page's own JS on the surrogate.
With Fullscreen: video only the video element is fullscreen, so these buttons are not shown: tap the video to reveal its own controls, or use the X.
Read the result in the black panel: OK if the surrogate position never changed,
SNAP if the page jumped (visible bug), BUG (hidden) if the surrogate position was
corrupted during fullscreen but recovered at exit. The hidden case is the same bug: with the fix OFF expect BUG or SNAP, with the fix ON expect only OK.
Optional: ?exit=3000 exits by page JS 3 s after entering fullscreen, ?autoscroll=1 scrolls to the player on load,
?busy=100 (or the Busy buttons) blocks the main thread to delay compositor commits, ?iframe=1 puts the player in a child frame,
?ovf=1 sets overflow-y: auto on html and body, ?custom=1 makes the fullscreen target a custom element,
?frames=1 adds an extra iframe (these three mimic glassdoor's markup).
?qr=1 shows the last verdict (pending, OK, HIDDEN or SNAP) as a QR code for the Selenium test.
?lock=1 emulates glassdoor's ScrollTrigger.refresh() (remember the scroll position, scroll to 0, restore it only if not 0) on resize, body resize and fullscreen exit.
The panel flags CORRUPTED in fullscreen as soon as the surrogate position drops during fullscreen.
Section 0 (starts at about 0 px)
Filler content to make the page long enough to scroll.
Section 1 (starts at about 700 px)
Filler content to make the page long enough to scroll.
Section 2 (starts at about 1400 px)
Filler content to make the page long enough to scroll.
Section 3 (starts at about 2100 px)
Filler content to make the page long enough to scroll.
Section 4 (starts at about 2800 px)
Filler content to make the page long enough to scroll.
Section 5 (starts at about 3500 px)
Section 6 (starts at about 4200 px)
Filler content to make the page long enough to scroll.
Section 7 (starts at about 4900 px)
Filler content to make the page long enough to scroll.
Section 8 (starts at about 5600 px)
Filler content to make the page long enough to scroll.
Section 9 (starts at about 6300 px)
Filler content to make the page long enough to scroll.
Section 10 (starts at about 7000 px)
Filler content to make the page long enough to scroll.
Section 11 (starts at about 7700 px)
Filler content to make the page long enough to scroll.
Section 12 (starts at about 8400 px)
Filler content to make the page long enough to scroll.
Section 13 (starts at about 9100 px)
Filler content to make the page long enough to scroll.