question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

autoResize problems when width is activated

See original GitHub issue

Observed 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. image

This is updated whenever the iframe content is changed, but not if the window is resized. @bluepnume

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

5reactions
chemoishcommented, Nov 7, 2018

@bluepnume Any updates?

Trial and error; I came to the same solution as @sprsam. The lack of documentation and examples is concerning 😓.

// parent configuration
const configuration = {
  autoResize: {
    height: true,
    width: false,
  },

  dimensions: {
    height: '100%',
    width: '100%',
  },
};
// child configuration
const configuration = {
  autoResize: {
    height: true,
    width: false,
  },
};

Note: This is for Iframe

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.

1reaction
sprsamcommented, Sep 20, 2018

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found