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.

OnSizeUpdated not updating width

See original GitHub issue

I’ve noticed you merged my PR! So I tried using the updated master.

First issue:

Is the npm package outdated? I tried installing and got a stale version of the code. So I went on and pulled directly from the repo.


Main issue:

Platform: Android (6.0.1)

Expected Behavior

used my fork to run this

Expected Behavior

log output of onSizeUpdated

log-expected


Actual Behavior

used the master to run this

Actual Behavior

log output of onSizeUpdated -> you can see the width does not change.

log


I’ll try looking in to it (Hope I have the time).

Thanks

Issue Analytics

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

github_iconTop GitHub Comments

4reactions
ShaMan123commented, Aug 20, 2018

Thanks for that! I didn’t realize that the body style was rejected from the PR. Changed it in my code (passed down a customStyle) and everything works perfectly.

Many thanks!!

0reactions
ShaMan123commented, Aug 20, 2018

I will mention for others:

Fixing problems related to WIDTH size change:

  • DOESN’T RESIZE AT ALL: consider passing a customStyle prop styling the body as follows:
   body {
                display: flex;
                align-items: center;
                justify-content: center;
            }
  • RESIZES TOO MUCH: If there are some problems with the width causing the WebView to overflow try wrapping your html with an element and styling that element with padding:

getHTML(innerHTMLString) {
       return `<span style="padding: 0 10px;">${innerHTMLString}</span>`
}
Read more comments on GitHub >

github_iconTop Results From Across the Web

div width not updating on resize - html - Stack Overflow
In Chrome: the height of images and divs is changing properly, but width of .inner divs and images is not updated, which results...
Read more >
View size is not updating in ViewWillAppear method in iOS 9.
I have an iOS app which support for. Orientation . Till iOS 8.4 it was giving us an correct view size (width and...
Read more >
Re-render a React Component on Window Resize | Pluralsight
Now we have set up some internal state, dimensions , that has height and width properties. Inside handleResize , we no longer simply...
Read more >
Window: resize event - Web APIs | MDN
The resize event fires when the document view (window) has been resized. This event is not cancelable and does not bubble.
Read more >
QWidget Class | Qt Widgets 6.4.1
updatesEnabled : bool. This property holds whether updates are enabled. An updates enabled widget receives paint events and has a system background; a...
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