W3C home > Mailing lists > Public > public-webapps@w3.org > July to September 2012

Scrolling when document.documentElement requests fullscreen

From: Chris Pearce <cpearce@mozilla.com>
Date: Fri, 07 Sep 2012 11:32:07 +1200
Message-ID: <50493277.1050307@mozilla.com>
To: public-webapps@w3.org
CC: Anne van Kesteren <annevk@annevk.nl>, Vincent Scheib <scheib@google.com>, Tantek Çelik <tcelik@mozilla.com>, Robert O'Callahan <rocallahan@mozilla.com>, rnyman@mozilla.com
We've had a couple of bugs filed against Gecko recently about scrolling 
fullscreen content.

Currently behaviour differs between Chrome and Gecko when fullscreen is 
requested on document.documentElement. When this happens Chrome still 
shows the viewport/browser scrollbars, but Gecko does not show viewport 

For example, compare the behaviour of 
http://robnyman.github.com/fullscreen/index-high-content.html in Chrome 
and Firefox.

Our developer evangelists tells us that authors intuitively expect 
scrollbars when requesting fullscreen on document.documentElement. 
Authors expect that since the document is scrollable (via the viewport 
scrollbars) before entering fullscreen it should remain scrollable after 
entering fullscreen.

Gecko does not show viewport scrollbars when requesting fullscreen on 
document.documentElement since the :fullscreen psuedoclass's 
position:fixed positioning styles cause it to be unscrollable. I don't 
know why Chrome shows scrollbars in this case.

We're proposing in the relevant Mozilla bug [1] to change our 
implementation so that the :fullscreen pseudoclass rule is :not(:root). 
This would mean that document.documentElement would still be scrollable 
after entering fullscreen, which would then match authors' expectations.


*|*:not(:root):fullscreen {
    position: fixed;
    top:0; right:0; bottom:0; left:0;
    /* etc... */

Before I make this change in Gecko I'd like to get consensus from other 
implementers that we want this behaviour, and get the spec changed to 
reflect that.

Chris Pearce.

[1] https://bugzilla.mozilla.org/show_bug.cgi?id=779286#c18
Received on Thursday, 6 September 2012 23:32:37 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 18:13:38 UTC