Closed
Bug 1355557
Opened 7 years ago
Closed 7 years ago
WebExtensions do not honor viewport width of iFrame
Categories
(WebExtensions :: Untriaged, defect)
Tracking
(Not tracked)
RESOLVED
INVALID
People
(Reporter: bit-dev, Unassigned)
Details
Attachments
(1 file)
421.32 KB,
image/png
|
Details |
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.133 Safari/537.36 Steps to reproduce: When migrating our Chrome extension to the WebExtensions platform, we ran into an issue with the UI where it wouldn’t correctly respect the viewport width for the iframe. This was the original relevant CSS: html, body, iframe { width: 100vw; height: 100vh; margin: 0; padding: 0; border: 0; overflow: hidden; display: block; } #panelHtml { height: 600px; width: 320px; } This is the updated CSS to ensure cross browser compatibility: html, body, iframe { height: 100vh; margin: 0; padding: 0; border: 0; overflow: hidden; display: block; } #panelHtml { height: 600px; } /* Keep the iframe and container locked to the same width without relative sizing. This prevents browser variance from effecting the extension. */ #panelHtml, iframe { width: 320px; } Please note that removing the viewport width style and re-applying after the initial render yields correct results. The style must be removed and re-applied, however, since opening and closing the extension alone is non-sufficient. Actual results: The extension panel opened up as a skinny bar (see attached screenshot). Expected results: The extension panel should have inherited it's width (320px) from the viewport of the iFrame.
Component: Untriaged → WebExtensions: Untriaged
Product: Firefox → Toolkit
Comment 1•7 years ago
|
||
The size of the viewport is determined by the size of the <body> or root <html> element, depending on whether you're in strict or quirks mode. I'm not sure what behavior you'd expect when giving them values based on viewport size.
Updated•7 years ago
|
Status: UNCONFIRMED → RESOLVED
Closed: 7 years ago
Resolution: --- → INVALID
Updated•6 years ago
|
Product: Toolkit → WebExtensions
You need to log in
before you can comment on or make changes to this bug.
Description
•