autoResize problems when width is activated
See original GitHub issueObserved Behaviour
When setting autoResize: { width: true }
, the iframe resizes whenever the content size is bigger than the xcomponent-outlet
div. On the other side, the iframe will not resize when the window is resized (or in a mobile device, when the orentation changes and the window is resized)
Expected behaviour
- The
xcomponent-outlet
listens also to window size changes, not only to internal size changes.
Background info
xcomponent
attaches absolute width and height attributes to that div.
This is updated whenever the iframe content is changed, but not if the window is resized. @bluepnume
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
ios - xcode - autoresize not working - Stack Overflow
I set the simulated metrics to iPad size (768 width - setting is «Freeform») and use regular autoresizing for width and height, ...
Read more >Responsive issue with _resizeAuto() and CSS min-width
I'm trying use CSS to set a min-width for my columns, but when I do this the table's responsiveness is broken.
Read more >Autoresizing Masks and You - The Coded Self
Before Auto Layout, the current layout system on iOS, views were resized using the springs and struts layout system. A view's width and...
Read more >Autoresize with max-height and scrolling - CodeMirror
Hey everyone! I'm looking to have the same behaviour shown on this topic here: Code editor with automatic height that has a minimum...
Read more >How to make Auto Layout more convenient in iOS - Medium
Autoresizing mask was the old way to make layout a bit more ... we need to specify a flexible width and a flexible...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@bluepnume Any updates?
Trial and error; I came to the same solution as @sprsam. The lack of documentation and examples is concerning 😓.
I don’t have experience debugging iframe issues. At first, I thought you needed the undocumented
listenForResize
to be set, but something somewhere takes care of it.The configuration above will auto resize the width and height to fill the available parent space. When the parent window resizes, the iframe will also resize to a fixed pixel.
Our solution ended up being related to removing autoResize: true for both height and width.
autoResize: { height: true, width: false }
. As a result, our width: 100% dimension setting stuck around while post robot helped relay the new height.