[TIMOB-8479] iOS: Event touchStart is not triggered when beginning a scroll in a scrollableView containing a scrollView
GitHub Issue | n/a |
---|---|
Type | New Feature |
Priority | Low |
Status | Open |
Resolution | Unresolved |
Affected Version/s | Release 1.8.2 |
Fix Version/s | n/a |
Components | iOS |
Labels | n/a |
Reporter | process |
Assignee | Unknown |
Created | 2012-03-07T03:03:47.000+0000 |
Updated | 2018-02-28T20:03:55.000+0000 |
Description
1) create a scrollableView
var myScrollableView = Ti.UI.createScrollableView({
id:'myScrollableView',
disableBounce:true,
width:Ti.Platform.displayCaps.platformWidth,
height:Ti.Platform.displayCaps.platformHeight,
zIndex:1000
});
2) create a scrollView containning 2 imageViews and add the scrollView in the scrollableView
var myScrollView = Ti.UI.createScrollView({
left: Ti.Platform.displayCaps.platformWidth,
top : Ti.Platform.displayCaps.platformHeight,
zoomScale : 1,
minZoomScale : 1,
maxZoomScale : 2,
width : Ti.Platform.displayCaps.platformWidth,
height : Ti.Platform.displayCaps.platformHeight,
contentWidth : Ti.Platform.displayCaps.platformWidth,
contentHeight : Ti.Platform.displayCaps.platformHeight,
showHorizontalScrollIndicator : false,
disableBounce: true
});
var img1 = Ti.UI.createImageView({
preventDefaultImage: true,
image: 'an image you what to show',
width: Ti.Platform.displayCaps.platformWidth,
height: Ti.Platform.displayCaps.platformHeight
});
var img2 = Ti.UI.createImageView({
preventDefaultImage: true,
image: 'an image you what to show',
width: Ti.Platform.displayCaps.platformWidth,
height: Ti.Platform.displayCaps.platformHeight
});
myScrollView.add(img1);
myScrollView.add(img2);
myScrollableView.add(myScrollView);
3) add an touchStart Event Listener on scrollableView or on the scrollableView
myScrollableView.addEventListener('touchstart', function(){ Ti.API.info('TOUCH START'); });
Whether the properties of scrollView or images that are set within it obstruct the "touchStart" event. In fact that event is triggered when scrolling to a second view. See simple test case that demonstrates the "touchStart" is triggered when beginning a scroll in a scrollableView containing a scrollView:
Repro sequence
Console output
So this test case should be considered INVALID unless there is a reason to use such objects & properties as per intended before.