`overflow:scroll` doesn't have any effect on the SVG foreignObject element (when it should probably clip and impose scrollbars)
Categories
(Core :: SVG, defect)
Tracking
()
People
(Reporter: tomlyn, Unassigned)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
|
248 bytes,
text/html
|
Details |
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:130.0) Gecko/20100101 Firefox/130.0
Steps to reproduce:
Please see this codepen
https://codepen.io/tomlyn/pen/KKGdNaR
Actual results:
It shows two foreignObjects. The one on the left has overflow-y set to scroll. In Firefox, the contents below the lower boundary of the foreignObject are visible and cannot be scrolled. In Chrome, the contents are hidden and can be vertically scrolled.
Expected results:
In Firefox, with overflow-y set to scroll or auto for a foreignObject, the contents of the foreignObject outside of its boundary should be hidden and become vertically scrollable.
Comment 1•1 year ago
|
||
The Bugbug bot thinks this bug should belong to the 'Core::Panning and Zooming' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.
Comment 2•1 year ago
|
||
From the SVG specification...
Within SVG content, the value auto implies that all rendered content for child elements must be visible, either through a scrolling mechanism, or by rendering with no clip.
So either rendering is valid.
But surely the likelihood is that, if the developer sets overflow-y: scroll, they would expect that the foreignObject becomes vertically scrollable. Right?
Comment 4•1 year ago
|
||
Changing component, please correct if this isn't the best component.
Comment 5•1 year ago
|
||
SVG 1.1 didn't do scroll at all. With SVG 2 it seems there is some expectation of scroll but mostly if you want scroll use HTML elements.
Comment 6•1 year ago
|
||
(In reply to Robert Longson [:longsonr] from comment #2)
From the SVG specification...
Within SVG content, the value auto implies that all rendered content for child elements must be visible, either through a scrolling mechanism, or by rendering with no clip.
So either rendering is valid.
That's true for auto, but when overflow-y is explicitly set to scroll then AFAICS scrolling is the required result. So I think there's a real bug here.
Comment 7•1 year ago
|
||
Here's a reduced testcase, just testing whether overflow:scroll has any effect on foreignObject (it doesn't seem to have any effect in Gecko or WebKit, though it works in Chromium).
Comment 8•1 year ago
|
||
[clarifying summary slightly to improve searchability -- I just found this bug when investigating a related bug for a WPT failure where this is the root cause, specifically bug 1951531]
Description
•