Problem description
The text written in the TextArea becomes invisible under certain circumstances. See the sample code below:
var tagWindow = Ti.UI.createWindow({
layout: 'vertical'
});
var scrollView = Ti.UI.createScrollView({
left: 0,
right: 0,
contentWidth: Ti.Platform.displayCaps.platformWidth
});
var textArea = Ti.UI.createTextArea({
left: 10,
right: 10
});
scrollView.add(textArea);
// tagWindow.addEventListener('open', function() {
// scrollView.scrollTo(0, -1);
// });
tagWindow.add(scrollView);
tagWindow.open();
The code as it is written, replicates the issue. However, it becomes fixed with the following changes:
1) uncomment the setTimeout - this will simulate a scrolling and the text becomes visible afterwards. Note that, if the ScrollView is long enough to scroll, the same happens by scrolling it manually.
2) removing the contentWidth in the ScrollView
3) removing the layout vertical from the Window
4) removing left and right from the TextArea
No comments