[TIMOB-20482] iOS: WebView converting spaces into extra lines
GitHub Issue | n/a |
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2017-05-06T14:36:01.000+0000 |
Affected Version/s | Release 5.2.0 |
Fix Version/s | Release 6.1.0 |
Components | iOS |
Labels | merge-6.1.0, webview |
Reporter | Michael Thornton |
Assignee | Vijay Singh |
Created | 2016-02-27T01:21:01.000+0000 |
Updated | 2017-05-09T16:39:22.000+0000 |
Description
I am loading content into a WebView container using both setUrl and setHtml. Both methods seem to be adding additional lines based on the number of spaces found (seems to be inconsistent). A workaround was to convert the spaces to  , but then word wrap did not work correctly.
Attached zip containing examples.
Attachments
I have tested this issue on Android and IOS. I have loaded content into a WebView container using both setUrl and setHtml. In either case, no additional line added based on number of spaces. The issue is not reproducible.
[Screenshot image link](http://postimg.org/image/d7np93n4j/) *Environment*:
First, thanks for the quick reply. Much appreciated to see such great developer support! I created a new project using the 5.2.0 GA SDK to make sure my app was not causing an issue. I tested this using Genymotion Google Nexus 6 - 5.1.0 - API 22 and it appeared ok. When I tested using iOS simulator in Appcelerator Studio for the iPad 2 and iPhone 6 it was still an issue. I also tested on an iPad Air 2 and it was still an issue. I have multiple users that are experiencing the issue on their individual iPad's. It looks like it may just be an iOS issue. Can you verify using the iOS simulator for iPad 2 in Appcelerator? How do I compare my environment settings with settings that were posted? Maybe I need an update. I am running OS X with the most recent update of Appcelerator. I just updated on 2/27/2016 and when I check for updates Appcelerator studio says I am current.
I am unable to reproduce the issue. It looks either it is fixed in this version or it may be some problem with iOS version. [~ewieber] Can you please verify it .
I am able to reproduce this issue, using: MacOS 10.12 (16A323) Studio 4.8.1.201612050850 Ti SDK 6.0.2.GA Appc NPM 4.2.8 Appc CLI 6.1.0 Alloy 1.9.5 Xcode 8.2.1 (8C1002) iOS 10 iPhone 6 sim Using the provided example I see the extra spaces after the text in the html files. See the attached image. !Screen Shot 2017-03-15 at 1.55.38 PM.png|thumbnail!
Thanks [~ewieber] . PR: https://github.com/appcelerator/titanium_mobile/pull/8892
The issue mentioned in this ticket is due to one change while fixing TIMOB-11777. Probable test case which [~ssekhri] has given me for the ticket TIMOB-11777 ( It was verified by him in early 2013 :) ) -
it is also working fine with above PR.
Backport for 6.1.0 please
Backported PR (6_1_X): https://github.com/appcelerator/titanium_mobile/pull/9012
FR passed, using: MacOS 10.12 (16A323) Studio 4.9.0.201704061825 Ti SDK 6.1.0 Appc NPM 4.2.9 Appc CLI 6.2.0 Alloy 1.9.11 Xcode 8.3.2 (8E2002) No additional lines were shown when setting the webview to a local file, using setHTLP or setURL. Tested using the provided sample with modifications.
Closing. Verified in builds: 6.1.0.v20170504081641 6.2.0.v20170507073539