Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-764] web view height:'auto' does not work - nothing is displayed

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2011-04-17T01:54:10.000+0000
Affected Version/sn/a
Fix Version/sRelease 1.3.0
ComponentsiOS
Labelsn/a
ReporterNolan Wright
Assigneebfreedman (at appcelerator)
Created2011-04-15T02:35:52.000+0000
Updated2011-04-17T01:54:10.000+0000

Description

Base UI => Views => Web Views => Auto Height

Comments

  1. Stephen Tramer 2011-04-15

    Commit c4c04723141cf3526f1507ace706e75f761d12c9 fixes this issue "enough" in that web views with height/width 'auto' now display. However they do not display 'properly', that is, with the containing scroll view sized big enough to view the entire webview content at once. Will leave this ticket open until that's solved.

  2. Jeff Haynie 2011-04-15

    (from [a04182c6f8209588272406721322dac4d8959104]) Closes #764: Auto works 'adequately'. Auto height is OK; auto width is not. See the comment in the source and on the ticket. http://github.com/appcelerator/titanium_mobile/commit/a04182c6f8209588272406721322dac4d8959104"> http://github.com/appcelerator/titanium_mobile/commit/a04182c6f8209...

  3. Stephen Tramer 2011-04-15

    Okay, here's the full scoop on autosizing web views.

    'auto' height works fine, and in fact WILL work with 'auto' width - it's just super ugly. This is because web views have a very bad habit of resizing their content so that it fits just outside of flexible widths, since 'document.width' lies about its values (but document.height, curiously, seems not to). Therefore the following are recommended:

    • DO NOT specify width/height values when creating a web view, so that it can take up an entire screen.
    • DO specify 'auto' height when integrating web views with other elements, but ALSO set a fixed width.
    • DO NOT use 'auto' width. Your view may not fit correctly, even with scalesToFit = YES.

JSON Source