New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 706971 link

Starred by 4 users

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Mac
Pri: 2
Type: Bug



Sign in to add a comment

body.scrollTop is zero in fullScreen mode

Reported by m...@fakecrow.com, Mar 30 2017

Issue description

UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36

Steps to reproduce the problem:
1. Give body enough height to create scroll. e.g: 2000px
2. Go into full screen mode, paste in console: document.body.webkitRequestFullscreen()
3. Use document.body.scrollTop

What is the expected behavior?
It should return the scrollTop value.

What went wrong?
scrollTop is always returned zero no matter its position. Similarly, setting scrollTop value doesn't work either.

Did this work before? N/A 

Chrome version: 56.0.2924.87  Channel: n/a
OS Version: 10.0
Flash Version: 

- It only does so when webkitRequestFullscreen method is used. Fine when F11 is used.

- It works fine in Firefox.
 
scrolltop.png
61.8 KB View Download
Labels: Needs-Milestone

Comment 2 by rtoy@chromium.org, Apr 4 2017

Components: -Blink Blink>CSS
Labels: Hotlist-Interop
Owner: meade@chromium.org
Status: Available (was: Unconfirmed)
Created a minified test case here: https://jsfiddle.net/aerkp0ga/. 

Definitely breaking with spec here: https://drafts.csswg.org/cssom-view/#dom-element-scrolltop

Labels: Update-Quarterly

Comment 5 by meade@chromium.org, Apr 5 2017

Cc: meade@chromium.org
Owner: ----
Labels: Needs-Bisect
Cc: kkaluri@chromium.org
Labels: -Needs-Bisect -Needs-Milestone hasbisect-per-revision M-59 OS-Linux OS-Mac
Owner: erikc...@chromium.org
Status: Assigned (was: Available)
Able to reproduce the issue on Windows 10, Ubuntu 14.04 and Mac 10.12.4 with chrome #59.0.3061.3
Issue broken in M59

Bisect Info:
===========
Good build : 59.0.3056.0 ,  Revision Range - 460603
Bad build  : 59.0.3057.0 ,  Revision Range - 460966

After executing the per-revision bisect script , i got the following CL's between good and bad build versions
===========================================
https://chromium.googlesource.com/chromium/src/+log/174eb44312202a5132de900553f7c302da0feef6..85bab14c835935e79a0b63f24b47f671840373de

The suspecting Change Log is :
-----------
https://chromium.googlesource.com/chromium/src/+/85bab14c835935e79a0b63f24b47f671840373de

Review-Url: https://codereview.chromium.org/2743053003

erikchen@- Could you please look into this issue, if it's related to your change?  if not could you please help us to reassign this issue to the right owner.

Gentle Ping!
erikchen@ could you please look into this issue.

Thanks..

Comment 9 by suzyh@chromium.org, Apr 12 2017

Cc: erikc...@chromium.org
Components: -Blink>CSS Blink>Scroll
Labels: -Update-Quarterly
Owner: ----
Status: Untriaged (was: Assigned)
Cc: bokan@chromium.org
Owner: erikc...@chromium.org
Status: Assigned (was: Untriaged)
Erik since this was bisected to your change can you have the first look at it?
I'm running Version 60.0.3112.101 (Official Build) (64-bit) on a Mac and this problem exists in all situations; not just full screen.

Whenever I scroll a page and run document.body.scrollTop from dev tools it returns `0`.

Comment 12 by ur...@oath.com, Aug 30 2017

I'm running beta Channel Version 61.0.3163.59 (Official Build) beta (64-bit) on Mac OS. I'm also noticing `document.body.scrollTop` always returns `0` no matter the scrolled position on the page. Current Stable version (Version 60.0.3112.101 (Official Build) (64-bit)) seems to be working fine. What I want to know is if this behavior (relaying on document.documentElement.scrollTop instead of document.body.scrollTop) is related only to the beta/dev/canary channels or is it going to be part of the stable release once 61 gets released.
Labels: Needs-TestConfirmation
This is likely related to, and fixed by: https://bugs.chromium.org/p/chromium/issues/detail?id=758130#c5.

TEs, can you confirm that this problem is fixed on ToT?
Labels: -Needs-TestConfirmation
Tested on latest Canary #62.0.3201.0 on Windows 7, Mac 10.12.6 and Ubuntu 14.04 and still able to reproduce the issue.

Attached the screenshot for reference.

Removing the label 'Needs-TestConfirmation'.

Thanks.
706971.png
532 KB View Download
I'm running stable channel Version 61.0.3163.91 (Official Build) (64-bit) on Mac OS Sierra 10.12.5 and I still get that issue; `document.body.scrollTop` returns always 0 even if the full screen mode is not enabled.

to reproduce the issue:
- execute window.scrollTo(0,100);
- document.body.scrollTop return 0 instead of 100

I've checkout out an old Chromium Version 59.0.3071.0 (Developer Build) (64-bit) Mac OS from https://commondatastorage.googleapis.com/chromium-browser-snapshots/index.html?prefix=Mac/464642/ and tried the same scenario: document.body.scrollTop returns the right scrollTop value 100.

Thanks,

Comment 16 by phistuck@gmail.com, Sep 15 2017

#15 - a non-full-screen version of this issue is unrelated here, please, only mention full-screen body.scrollTop issues here.

The issue you mentioned is an intentional change (albeit accidentally without a lot of forewarning). Firefox behaved this way for years.
See https://www.chromestatus.com/feature/6386758136627200 for some details.
erikchen@ can you take another look. It seems that TE does still see the issue.

Sign in to add a comment