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 <[email protected]> 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
> > > [email protected]
> > > https://lists.mozilla.org/listinfo/dev-platform
> > -- Paul
> -- Paul
-- Paul
_______________________________________________
dev-platform mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-platform