Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-20177] Label inside Scrollview is not show after certain amount of characters

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionCannot Reproduce
Resolution Date2019-11-13T22:30:28.000+0000
Affected Version/sRelease 5.1.1
Fix Version/sn/a
ComponentsiOS
LabelsLabel, ScrollView
ReporterDavid Benko
AssigneeVijay Singh
Created2015-12-23T00:09:11.000+0000
Updated2019-11-13T22:30:28.000+0000

Description

After 13k characters the label don't appear
<Alloy>
	<Window backgroundColor="white">
		<ScrollView>
			<Label id="label" />
		</ScrollView>
	</Window>
</Alloy>
var labelLength = 1000;

setInterval(function() {
  console.log(labelLength);
  $.label.text = Array(labelLength).join("a");
  labelLength += 1000;
}, 1000);

$.index.open();

Comments

  1. Sharif AbuDarda 2015-12-23

    Hello, This is a valid bug in Scrollview with Label. The label doesn't show inside a scrollview when the label character exceeds 13k. I have tested the reported sample code in SDK 5.1.1.GA with iOS 9.1. I have observed the same result. The label vanishes when the character length exceeds 13k. I tried to test the behavior without the scrollview and the I saw that it works. The label doesn't vanishes. So it's a bug in scrollview to limit the label character.
       Titanium.UI.setBackgroundColor('#FFF');
       var window = Ti.UI.createWindow();
       var Name = Ti.UI.createLabel();
       var CallBtn = Ti.UI.createButton({
           title : "Test",
           bottom : 50,
       });
       CallBtn.addEventListener('click', function(e) {
           var labelLength = 1000;
           setInterval(function() {
               console.log(labelLength);
               Name.text = Array(labelLength).join("a");
               labelLength += 1000;
           }, 1000);
       });
       window.add(Name);
       window.add(CallBtn);
       window.open();
       

    My Environment

    OS X El Capitan 10.11.2 XCode 7.1 iPhone Simulator 6s Plus / iOS 9.1 Ti SDK 5.1.1.GA Thanks.
  2. David Benko 2015-12-23

    This happens only on iOS
  3. David Benko 2015-12-28

    Any known workarounds?
  4. David Benko 2015-12-28

    Possible workaround: Split the text in multiple labels. Having multiple labels with less than 13k characters inside the scrollview does not cause the bug One note: it appears that the bug is not about character limit, but size of the label. If you have a lower font size, its possible to have more than 13k characters without the label vanishing
  5. Alan Hutton 2019-11-13

    Cannot reproduce. I stopped after 28000. Axway Appcelerator Studio, build: 5.1.4.201909061933  macOS : 10.15 Node.js Version : 8.9.1 npm Version : 5.5.1 Appcelerator CLI : 7.1.1 Titanium CLI CLI Version : 5.2.1 node-appc Version : 0.2.49 Titanium SDKs : 8.2.1.GA

JSON Source