[Webkit-unassigned] [Bug 124139] Mouse wheel events dropped from non-scrolling iframe on first load

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jan 5 16:04:24 PST 2015


https://bugs.webkit.org/show_bug.cgi?id=124139

--- Comment #6 from Jason Davies <jason.davies at gmail.com> ---
(In reply to comment #5)
> > I'm afraid I disagree that this is working as expected: my understanding is
> > that the "scrolling" attribute indicates whether or not a scrollbar should
> > be shown for the iframe, not whether mouse wheel events should be blocked.
> 
> 'scrolling' isn't specified for iframe in the HTML5, so it's hard to know
> what behavior is best here.
> <https://html.spec.whatwg.org/multipage/embedded-content.html#the-iframe-
> element>.
> 
> HTML4 doesn't specify how wheel events should be interpreted when the iframe
> has its scrolling attribute set to 'no'. It merely requires that no
> scrolling devices for the frame be provided, which we comply with.

Right.  Although it doesn't seem to be in any of the specs, I would argue that the "scrolling" attribute is about enabling/disabling the scrollbar only, and wheel events should still propagate to the iframe document.

> > This seems to be the interpretation of Chrome/Firefox/IE too.  As far as I
> > know, there isn't any other way to disable the scrollbar, and I think
> > blocking mouse wheel events inadvertently prevents desired behaviour for
> > pages within the iframe (mouse wheel is commonly used for zooming maps, for
> > example).
> 
> Does using the CSS3 "overflow:hidden" not work the way you would like? This
> might need to be combined with the iframe "seamless" attribute.

It doesn't really help in our case on http://bl.ocks.org/ - because we want to disable the scrollbar for any iframe document (i.e. that we don't have control over).  Using <iframe style="overflow:hidden"> doesn't work in current browsers.

I appreciate that it's a bit of an edge case - if you *do* have control over the iframe document then it's not an issue as you can set overflow:hidden within the iframe document.

I think the reason scrolling="no" was dropped for HTML5 is that overflow:hidden is the intended replacement, but unfortunately there isn't any browser support for it right now on the iframe itself.

I think the ideal resolution here would be for scrolling="no" to avoid blocking the wheel event from propagating to the iframe document, i.e. it should only disable the scrollbar.  This would essentially be the same as overflow:hidden (when it is eventually supported).

This would be:
a) consistent with other mainstream browsers: Chrome/Firefox/IE.
b) consistent with the current behaviour on refreshing (!)
c) preserve functionality for wheel-enabled JavaScript pages embedded in an iframe which wants to hide its scrollbars.

Thanks!

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20150106/030648f8/attachment-0002.html>


More information about the webkit-unassigned mailing list