Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8873419
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T18:27:40+00:00 2026-06-14T18:27:40+00:00

Edited:[All the following happens even on stock IOS browser] I have a UiWebView which

  • 0

Edited:[All the following happens even on stock IOS browser]

I have a UiWebView which load a local HTML page.
The content of the page is managed dinamically by JS, so it may grow or shrink vertically.

The layout is:

<div id="myContainer">
Some text here
</div>

The text-content may grow up to require vertical scroll, and everything is working fine.

Whenever i load new content, I use:

container.innerHTML = '';
container.appendChild(newContent);

Again, everything is fine.

The problem came when i scroll the page vertically: if I load a big content, the scroll is managed correctly, but then I load a small content and the page keeps the same big size set by the big content, with a lot of unused blank space at the end.

If i don’t ever try to scroll the page vertically, the problem don’t shows up (eg. i load the big content, I don’t scroll, then I load the small content => the scroll is fine and page is shrinked to the latter). That’s quite weird, I think something may be broken in the ScrollView logic or in the Webkit engine.

I already tried by using timeouts between innerHTML = ” and appendChild.
No luck here.

I’m experiencing this problem just on IOS stock browser & UiWebView, not on any desktop browser nor Android mobile browser / WebView.

Could anyone help?

Thanks

Edit:
Reloading the UiWebView by browsing a blank URL or anything else is not an applicable way in this case: my app is fully JS and I definitely cannot restart the app each time.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T18:27:41+00:00Added an answer on June 14, 2026 at 6:27 pm

    Finally, i came across a fix for this, I post here so that it may help someone other. The problem was about the containing div that won’t shrink. I just set height of the container to zero while changing its content, and it return to correct size:

    container.innerHTML = '';
    container.style.height = '0px';
    container.appendChild(newContent);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

EDIT : I have edited the OP with all the suggestions I got from
UPDATED/EDITED to clarify: I have the following defined in my Blog AR object scope
i have a following feed from twitter and im making all links clickable and
I have the following situation: I have a work sheet which contains a list
I have the following code, which loops through an array of menuoptions and on
Edited:: Hi All, I have a XML file like this, <message> <c1> <rrcConnectionSetupComplete> <rrc-TransactionIdentifier>2</rrc-TransactionIdentifier>
I have the following Nhibernate XML file, edited to the core bits: <?xml version=1.0
How long is the timeout for facebook share cache. I edited all of my
If I have the following code: val wows = Buffer[Wow]() def yo(f: _ =>
EDIT following resolution, this has been substantially edited to dump irrelevant detail and explain

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.