Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-18772] iOS: Content in ScrollableView will not display If ScrollableView is inside a ScrollView

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2015-04-01T20:46:39.000+0000
Affected Version/sRelease 3.5.0, Release 3.5.1
Fix Version/sRelease 4.1.0
ComponentsiOS
LabelsscrollableView, scrollview
ReporterShuo Liang
AssigneeVishal Duggal
Created2015-04-01T05:11:13.000+0000
Updated2017-03-16T22:50:53.000+0000

Description

Problem

Content in ScrollableView will not display If ScrollableView is inside a ScrollView.

Reproduce:

Simply run the following code.
var win = Titanium.UI.createWindow({
	height: Ti.UI.Fill
});

var textView = Ti.UI.createView({
	width: "97%",
	top: "0", 
	left: "7",
	touchEnabled:"false",
	layout:'vertical'
});

var textArea = Ti.UI.createTextArea({
	width:"100%",
	value:"This policy provides at least the minimum amounts of liability insurance required by the Texas Motor Vehicle Safety Responsibility Act for the specified vehicles and named insureds and may provide coverage for other persons and other vehicles as provided by the insurance policy."
});

textView.add(textArea);

var scrollableView = Ti.UI.createScrollableView({
	views:[textView],
	backgroundColor: "#ffffff",
	layout: "horizontal",
	scrollingEnabled:"false",
	touchEnabled:"false"
});

var scrollView = Titanium.UI.createScrollView({
	width: "93%",
	height: "85%",
	layout: "vertical",
	scrollType: "vertical",
	scrollingEnabled: "true",
	touchEnabled: "true"
});

scrollView.add(scrollableView);
win.add(scrollView);
win.open();

Expect Result:

The TextArea should display well.

Actual Result:

Nothing inside ScrollableView will display.

Note:

Problem only happens in SDK 3.5.* It works well in SDK 3.4.1

Comments

  1. Vishal Duggal 2015-04-01

    Pull pending https://github.com/appcelerator/titanium_mobile/pull/6758
  2. Vishal Duggal 2015-04-01

    The problem is with the layout:horizontal property set on ScrollableView. Since scrollableView does not support adding children directly and only supports the views property, this property makes no sense and should be ignored. The Above PR does the same
  3. Lee Morris 2017-03-16

    Closing ticket as fixed.

JSON Source