Reason for document.scrollingElement to be document.documentElement

73 views
Skip to first unread message

Martin Kadlec

unread,
Nov 5, 2016, 2:02:21 PM11/5/16
to Chromium HTML5
Hi,
for some reason, on my mac in latest Chrome versions, the document.scrollingElement property is document.documentElement instead of document.body. The document.compatMode is 'CSS1Compat' so it doesnt seem to be some kind of weird quirks mode. This happens on all websites.

What are the possible reasons for that to happen?

PhistucK

unread,
Nov 5, 2016, 4:48:45 PM11/5/16
to Martin Kadlec, Chromium HTML5
document.scrollingElement === document.documentElement is actually the standards compliant behavior, not the quirks mode behavior. So this is actually the correct behavior for CSS1Compat compatMode, per the specification. See https://dev.opera.com/articles/fixing-the-scrolltop-bug/.

But - Chrome has not enabled it by default yet (:(), however, if you enabled the experimental web platform features (chrome://flags/#enable-experimental-web-platform-features), it will be enabled.

If that flag is not enabled in your Chrome, I suspect it might be a finch experiment (a feature that is only enabled for some percentage of the users). Restarting Chrome completely might opt you out of the experiment, I think.


PhistucK

--
You received this message because you are subscribed to the Google Groups "Chromium HTML5" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-html5+unsubscribe@chromium.org.
To post to this group, send email to chromiu...@chromium.org.
Visit this group at https://groups.google.com/a/chromium.org/group/chromium-html5/.
For more options, visit https://groups.google.com/a/chromium.org/d/optout.

Reply all
Reply to author
Forward
0 new messages