Going "back" from fullscreen Youtube video behaves strangely and loses scroll position |
|||||||||
Issue description
Chrome Version : 67.0.3396.99
OS Version: OS X 10.13.5
URLs (if applicable) :
Other browsers tested:
Add OK or FAIL after other browsers where you have tested this issue:
Safari:
Firefox: OK
IE/Edge:
What steps will reproduce the problem?
1. On a macbook, go to youtube.com, scroll down and remember the scroll position
2. Play a video, go back (cmd left arrow) notice the scroll position is restored
3. Play video again, fullscreen the page with "^cmd F", go back, the scroll is restored, exit fullscreen and the scroll remains correct
4. Play video again, fullscreen the video using the video's fullscreen control, now go back with cmd left arrow, it does not navigate back, instead the video goes back to the start and when you exit fullscreen the page now goes back and loses its scroll position
What is the expected result?
When you go back from fullscreen video, the page should correctly navigate back and the page should not be in fullscreen mode and the scroll position should be intact
What happens instead of that?
When you go back, it rewinds the video to the start and the video stays in fullscreen. At first glance this might seem WAI, but it clearly isn't, because when you exit fullscreen it *then navigates back* and *it loses its scroll position*.
Why does this matter?
Because (a) it's a bug, and (b) it makes navigating and viewing videos noticeably less convenient on Chrome than on other browsers (at least Firefox).
Please provide any additional information below. Attach a screenshot if
possible.
UserAgentString: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36
,
Jul 9
,
Jul 9
Looks like a combination of scroll and focus issues.
,
Jul 10
Able to reproduce the issue on reported chrome version 67.0.3396.99 also on latest chrome 69.0.3486.0 using Mac 10.13.5, Ubuntu 17.10 and Windows 10. Note: We can reproduce on Windows and Linux by hitting alt+left arrow Same behavior is seen on M60(60.0.3112.113) hence considering it as non-regression and marking it as Untriaged. Thanks!
,
Jul 18
,
Jul 19
,
Jul 19
I suspect this is a fullscreen/nav issue, as much as it is a scroll problem. ymmv
,
Sep 7
Actually, this is expected behavior, youtube is using `history.scrollRestoration = 'manual'` which prevent chromium do any scroll restoration.
,
Sep 7
Are you sure that's relevant to this use case? You need to start from a non-video page, eg, youtube search results or trending. This is our starting page which we are scrolling down to find videos on. Scroll down, navigate to any other page (including a video) and come back, it will indeed remember the scrolling. It only fails if you do a native fullscreen of the video on chrome (which is a primary use case of course). This is painfully inconvenient for browsing videos. If you're viewing videos from a list like trending or search results, and constantly losing the scroll position it's simply unusable. The only way to make this behave in Chrome is to middle-click every video you watch into a new tab.
,
Sep 7
Broken use cases: - watching videos form trending - watching from search results - watching from the "uploaded videos" list on a youtube channel page - any other case where the launch page is scrolled etc
,
Sep 7
> You need to start from a non-video page, eg, youtube search results or trending. This is our starting page which we are scrolling down to find videos on. Scroll down, navigate to any other page (including a video) and come back, it will indeed remember the scrolling. It only fails if you do a native fullscreen of the video on chrome (which is a primary use case of course). Is it youtube doing scroll restoration itself. Because I checked the youtube.com and page with video. Both of them include `history.scrollRestoration = 'manual'` which prevents chrome scroll restoration. +majidvp
,
Sep 7
I'm not sure what's going on there, but if I go to youtube.com and scroll down, then navigate to google.com, then go back, scroll position is retained. Same thing if I click on a video and then go back. Can you try that please and see if it gels with what scrollRestoration = 'manual' is supposed to be doing?
,
Sep 7
FYI: Looking at the video on this page: https://developers.google.com/web/updates/2015/09/history-api-scroll-restoration It seems that scrollRestoration = 'manual' should actually *retain* the scroll position (see "After" in the video). It's purpose is to stop the scroll from jumping around due to page contents being changed prior to navigation, etc. This is confusing, but the scroll *is* retained expect when you fullscreen a video on Chrome.
,
Sep 7
It actually has issue, I build a demo for it. http://ht.chaopeng.me/yt-restore.html This page does not have `history.scrollRestoration = 'manual'`
,
Sep 7
,
Sep 7
I recommend you include a link to a different video. The one you are using is "live" and "ALT-left" behaves differently on it, probably because the video can't go backwards or rewind. This points to the issue possibly being related to videos "capturing" and interfering with certain the navigation events.
,
Sep 15
Another data point: was watching TGIF video today, and encountered a bug: - if I enter fullscreen - pause the video - i can't resume the video while in fullscreen (by either clicking play button, or spacebar) - if I exit fullscreen, I am able to resume the video.
,
Sep 15
Hi atotic@, your issue should be different with this one. Please report a new issue and add "Restrict-View-Google" label. Thank you.
,
Oct 31
The issue in #1 is fixed on dev channel 72.0.3595.2. Maybe related to https://chromium-review.googlesource.com/c/chromium/src/+/1195714/. ----------------------- The issue on #14 is because: 1. The new page loading and scroll restoration happens before exit full screen, no restore is needed since size is big. 2. After that new page size but can not restore since it already mark restored. 3. The FullscreenController::DidExitFullscreen only call the old page. I actually don't know how can we fix it. Try: open a youtube video full screen and click on play next then navigate back. We maintain full screen for previous video. This explain why the loading and restoration and exit fullscreen execute in order below. The fix may need to do in youtube. If user navigate back/forward outside of youtube exit full screen before navigating.
,
Nov 1
It works in Firefox, but I think Safari has the same bug as Chrome, not surprising perhaps. The version I have of Chrome now (70.0.3538.77) is behaving different to #1. but it's still broken. Now, when you go back from a fullscreen video, it *does* actually go back to the previous page, but it still loses the scroll position. Can we get a clear statement of what the expected behavior should be? It seems obvious that it should retain the scroll position, anything else has to be a bug, surely. Given that it makes viewing videos from your subscriptions or play list so painful, I would think it's in Google's interest to fix this asap. Play lists are unusable like this, which is why I now use Firefox. I'm not concerned with going back and forth between videos, the problem is going back to the play list and selecting a different video. This is impossible if it constantly discards the scroll position.
,
Nov 1
mwr@, please try chrome dev or canary. The fix is not in stable now. Based on youtube is using `history.scrollRestoration = 'manual'`, the fix is because we don't over write youtube's restoration. For the demo in #14: > Can we get a clear statement of what the expected behavior should be? I think we need to answer 2 question: 1. is the scroll restoration correct at the time it restored? Yes, no layout view scrollbar needed because the frame size still in full screen and the document size less than the full screen. If we change the div height to 100000px then the restoration is correct from full screen. - loading, scroll restore to youtube link <a> - exit full screen, scroll anchoring keeping the scroll focus to youtube link <a> 2. is the fullscreen exit and loading execute order correct? Yes, and we can see youtube is actually using it. So I don't think we need any fix for this issue. majidvp, WDYT? |
|||||||||
►
Sign in to add a comment |
|||||||||
Comment 1 by mwr@google.com
, Jul 8