Titanium JIRA Archive
Appcelerator Community (AC)

[AC-5174] 6.2.0.RC webview Ti.UI.SIZE incorrect when run-on-main-thread is true

GitHub Issuen/a
TypeBug
Priorityn/a
StatusClosed
ResolutionNeeds more info
Resolution Date2017-11-29T20:32:48.000+0000
Affected Version/sn/a
Fix Version/sn/a
Componentsn/a
Labelsn/a
ReporterAnthony Chung
AssigneeShak Hossain
Created2017-09-05T23:40:41.000+0000
Updated2017-11-29T20:32:48.000+0000

Description

6.2.0.v20170905144404 When true webview with long body text will have height cut off as Ti.UI.Size is not correct. Test case. Put 2 webviews inside a scrollview, vertical layout. First webview has single line of body text for html. Second webview has multiple paragraphs. Both webviews need ti.ui.size as height. Second webview will have Ti.UI.SIZE incorrect when run-on-main-thread is true. Second webview will have Ti.UI.SIZE correct when run-on-main-thread is false. Note: This affects compatibility with production apps using webview and hyperloop as hyperloop requires run-on-main-thread to be true.

Comments

  1. Ewan Harris 2017-09-06

    Hey [~threethirds], thanks for the ticket. Could you provide a little more info please so we can prioritize this and move it along as necessary * Is this Android, iOS or Windows? * What was the SDK version you were using when this last matched the expectations, a 6_1_X release or earlier? I tried the below code on Android, but I wasn't fully sure what I was looking for, could you review the code and see whether it matches yours? Thanks!
       var win = Ti.UI.createWindow();
       
       var scrollview = Ti.UI.createScrollView({
           layout: 'vertical',
           height: Ti.UI.FILL,
           width: Ti.UI.FILL,
           showVerticalScrollIndicator: true,
       });
       
       
       var wv1 = Ti.UI.createWebView({
           html: '<html><body><p>lorem ipsum</p></body></html>',
           height: Ti.UI.SIZE
       });
       
       var wv2 = Ti.UI.createWebView({
           height: Ti.UI.SIZE,
           html: '<html><body><p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.\nCras eu fringilla sem.\nIn porta ante nec dolor dictum egestas et in felis.\nVestibulum auctor quam vel sagittis sollicitudin.\nEtiam in eros semper orci efficitur pharetra.\nPhasellus nec consequat lectus, a molestie lorem.\nPhasellus viverra a erat id egestas.\nIn vitae congue lorem, consequat sollicitudin augue.\nIn massa est, sollicitudin vitae erat eu, finibus aliquet nulla.\nNulla vitae vulputate dui.\nMorbi fermentum urna vel nibh egestas pharetra.\nMauris laoreet ante magna, sit amet porttitor tellus semper consectetur.\nSed pellentesque velit laoreet nunc fermentum tempor.\nDonec sit amet porta ante, id auctor nunc.\nDonec laoreet ante id erat porttitor interdum.\nNunc ornare nulla eu purus tristique, maximus aliquam mauris porta.\nNulla facilisi.\nDonec sollicitudin feugiat eros, vel tempus felis suscipit ut.\nMaecenas faucibus purus ac accumsan condimentum.\nSuspendisse turpis ex, tempus ut dictum sit amet, efficitur nec nisl.\nEtiam varius molestie libero.\nNulla facilisi.\nMaecenas pretium eget nisl in faucibus.\nDonec non nisi felis.\nMaecenas vitae tortor eu justo consequat aliquet.Proin sem enim, rutrum non pharetra vel, vulputate eu ipsum.\nDuis vel dui rhoncus, rhoncus velit vel, vulputate sem.\nSed dignissim rhoncus lobortis.\nCurabitur ut imperdiet mi, quis euismod metus.\nDonec dictum semper aliquam.\nDonec eget urna at nisl vehicula placerat eget volutpat urna.\nMorbi lacinia cursus erat in porttitor.\nMaecenas vulputate at velit in imperdiet.\nSuspendisse malesuada posuere nisi, a commodo enim laoreet sed.\nAliquam imperdiet fringilla odio sed blandit.\nInteger suscipit turpis ut tempor finibus.\nVestibulum sed tortor dui.\nAliquam vestibulum dolor in enim porta, eu posuere magna ultrices.\nVestibulum feugiat nec ex id vulputate.\nProin eu justo efficitur, dignissim eros dapibus, vestibulum diam.\nDonec non nunc et libero tincidunt porta.\nProin leo metus, rhoncus eget ante eu, feugiat posuere arcu.\nVestibulum tempor, dolor et pellentesque facilisis, enim justo convallis nisl, sed varius lorem eros vitae orci.\nVivamus dictum erat ac ullamcorper ornare.\nSuspendisse pharetra fringilla finibus.\nPhasellus euismod libero lorem, et consectetur nunc varius quis.\nDuis diam nisl, ultrices eu efficitur eget, accumsan ac magna.\nFusce dignissim sapien non odio molestie tincidunt nec eu eros.\nSed eget mauris sed urna venenatis dictum id ac ex.\nFusce et nisi ullamcorper, tempus urna vel, dapibus libero.\nNunc vel cursus justo, vitae cursus risus.\nCurabitur sapien purus, vestibulum molestie tellus sed, mollis molestie sapien.\nDonec nec mauris accumsan, gravida diam et, porta sapien.\nMorbi nibh purus, fringilla a consectetur sit amet, tincidunt nec est.\nUt semper facilisis euismod.\nAliquam erat volutpat.\nPhasellus efficitur lectus id urna pharetra, id volutpat nunc consequat.\nNulla sed leo turpis.\nCras neque tellus, tristique eget nisi a, mattis placerat nisl.\nEtiam et vulputate tortor.\nCras tincidunt justo ac lectus aliquet porta.\nQuisque dolor eros, egestas ut eros in, ultricies finibus lectus.\nMorbi at elit sit amet nisl pulvinar iaculis.\nCurabitur rutrum, nulla in ornare vehicula, nisi quam laoreet mi, vitae scelerisque mi ex vitae magna.\nVestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae;</p></body></html>',
       });
       
       scrollview.add(wv1);
       scrollview.add(wv2);
       
       win.add(scrollview);
       win.open();
       
  2. Ewan Harris 2017-09-07

    Copying from email received, [~hknoechel] looks to be iOS and not a regression from 6.1.2
       Hi,
       This is for iOS. Not Android. Happens in simulator and on device.
       You are looking for the height to be cut off on the second longer webview text.
       I think 6.1.0 was last correct behavior.
       Cheers,
       Anthony
       
  3. Sharif AbuDarda 2017-11-05

    Hello, can you please test this on SDK 6.3.0.GA? Thanks.
  4. Sharif AbuDarda 2017-11-11

    Hello [~threethirds], Can you please let us know the result of latest SDK 6.3.0.GA, If the issue still there, please provide the full reproducible sample code (or a sample project). Thanks.
  5. Mostafizur Rahman 2017-11-27

    Hello [~threethirds], I just wanted to follow up here. Did you manage to follow the instructions provided earlier? Let us know if you still experience any issue. We would be happy to assist you. Best Regards! Best

JSON Source