It has nothing to do with scrollgrab.
Scrolling overflowing remote iframes doesn't work on osx + apzc.

Paul Rouget wrote:
> Apparently, the issue is when I use an iframe.
> 
> My code:
> 
> > <div id="out">
> >    <h1>hi</h1>
> >    <iframe id="in" remote="true" src="http://paulrouget.com";></iframe>
> > </div>
> > 
> > document.querySelector('#out').scrollgrab = true;
> > 
> > #out {
> >   padding: 10px;
> >   background-color: #6F0;
> >   width: 200px;
> >   height: 250px;
> >   overflow: scroll;
> > }
> > 
> > #in {
> >   width: 200px;
> >   height: 250px;
> >   background-color: white;
> >   overflow: scroll;
> > }
> > 
> > h1 {
> >   display: block;
> >   height: 50px;
> >   margin: 0;
> > }
> 
> Scrolling with the mouse doesn't work.
> It works if I do not use an <iframe>.
> It's in a certified app. I'm on osx.
> 
> Paul Rouget wrote:
> > I managed to make my example work.
> > So it must be a thing in my original code
> > that doesn't play well with this.
> > 
> > I'll investigate.
> > 
> > Paul Rouget wrote:
> > > I set scrollgrab on the container.
> > > But now, I can't scroll anything.
> > > 
> > > This is the layout:
> > > 
> > > <div id=scrollable>
> > >   <div></div> // height: 50px;
> > >   <iframe></iframe> // height: 100vh;
> > > </div>
> > > 
> > > So #scrollable overflows by 50px. We can't see
> > > the 50 last pixels of the iframe (expected).
> > > I set scrollable.scrollgrab = true.
> > > And now, I can't scroll anything.
> > > 
> > > The iframe is still scrollable with the mouse.
> > > 
> > > If I don't set #scrollable {overflow:scroll}, I come back
> > > to the original behavior (iframe scrolls first).
> > > 
> > > Any idea?
> > > 
> > > Paul Rouget wrote:
> > > > Botond Ballo wrote:
> > > > > On Wed, Jan 21, 2015 at 1:37 AM, Paul Rouget <p...@mozilla.com> wrote:
> > > > > > Is it possible to make a container scroll before its child?
> > > > > >
> > > > > > Example:
> > > > > >
> > > > > > 2 nested divs. #out and #in. #in is inside #out. Both overflow.
> > > > > >
> > > > > > [...]
> > > > > >
> > > > > > Is there a way to make #out scroll first, then #in?
> > > > > >
> > > > > > Not sure how relevant this is but:
> > > > > > - APZC is enabled
> > > > > > - #in is actually an <iframe remote='true'>
> > > > > 
> > > > > Yes! The addressbar in the B2G browser makes use of exactly this (with
> > > > > #in being the iframe of the page you're looking at, and #out being a
> > > > > div grouping the address bar and the iframe).
> > > > > 
> > > > > It's done by setting the DOM property 'scrollgrab' [1] on #out.
> > > > > 
> > > > > Note that 'scrollgrab' is implemented in APZ, and it's only enabled in
> > > > > chrome code and certified apps [2].
> > > > > 
> > > > > Hope that helps!
> > > > 
> > > > Absolutely. Thanks a lot!.
> > > > 
> > > > > [1] 
> > > > > http://mxr.mozilla.org/mozilla-central/source/dom/webidl/HTMLElement.webidl?rev=68ec1899bb63#98
> > > > > [2] 
> > > > > http://mxr.mozilla.org/mozilla-central/source/dom/html/nsGenericHTMLElement.cpp?rev=e8981c280f7b#1713
> > > > > _______________________________________________
> > > > > dev-platform mailing list
> > > > > dev-platform@lists.mozilla.org
> > > > > https://lists.mozilla.org/listinfo/dev-platform
> > > > -- Paul
> > > -- Paul
> > -- Paul
> -- Paul
-- Paul
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to