Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-528] scroll view inside table view row does not scroll

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2012-04-27T16:49:59.000+0000
Affected Version/sn/a
Fix Version/sRelease 2.0.1
ComponentsiOS
Labelsdefect, ios, iphone, qe-testadded, scrollview, tableview
ReporterNolan Wright
AssigneeNeeraj Gupta
Created2011-04-15T02:31:05.000+0000
Updated2012-10-09T19:07:54.000+0000

Description

from community.

code:

var data = [];
var win = Ti.UI.createWindow();

var row = Ti.UI.createTableViewRow({className:'scrolltab',height:67,backgroundColor:'#fff',selectionStyle:Ti.UI.iPhone.TableViewCellSelectionStyle.NONE});

var scrollView = Titanium.UI.createScrollView({
    contentWidth:500,
    contentHeight:50,
    top:10,
    height:50,
    width:230,
    borderRadius:10,
    backgroundColor:'#13386c'
});
row.add(scrollView);
var view1 = Ti.UI.createView({
    backgroundColor:'#336699',
    width:440,
    height:40,
    left:10
});
scrollView.add(view1);
// add a bunch more views to the scrollView 

data.push(row);

feedTableView = Titanium.UI.createTableView({
    data:data
});

win.add(feedTableView);

win.open();

Comments

  1. Jeff Haynie 2011-04-15

    i don't doubt it. :<

  2. Blain Hamon 2011-04-15

    My main concern about this is one of events trapping. This might be something I don't need to worry about, but it is something that may be an obstacle.

  3. rob (at robmarscher) 2011-04-15

    Same issue seems to occur with a ScrollableView. I noticed while trying to create something like the Trending Now section of the Twitter for iPhone app. Thanks for looking into it.

  4. Thomas Huelbert 2011-04-15

    valid, needs testcase

  5. rob (at robmarscher) 2011-04-15

    I was able to work around the issue by defining an empty function and assigning it to the click events of the scroll/scrollable view and the table row. Seems to override whatever prevents the touch from bubbling down the the inner view. I'll post on the community Q&A section.

  6. Jeff Haynie 2011-04-15

    you can also try touchEnabled: false

  7. Vikramjeet Singh 2011-07-27

    Bug Scrub: Valid. No test Case exists. Tested by creating my own app. Tested On: TiMOB sdk version: 1.7.2 Studio version: 1.0.2 OS Version: Mac OSX Lion Device tested On - iPhone 4.3.4
  8. Dawson Toth 2012-04-27

    I don't believe this is valid anymore. Example code:
       var win = Ti.UI.createWindow({
           backgroundColor: '#fff'
       });
       
       var row = Ti.UI.createTableViewRow({
           height: 100
       });
       
       var scrollView = Ti.UI.createScrollView({
           contentHeight: 200,
           top: 10, bottom: 10,
           backgroundColor: '#ccc'
       });
       scrollView.add(Ti.UI.createView({
           backgroundColor: '#336699',
           top: 70, height: 100
       }));
       row.add(scrollView);
       
       win.add(Ti.UI.createTableView({
           data: [ row ]
       }));
       win.open();
       
    Tested with {quote} version=2.1.0 module_apiversion=2 timestamp=04/27/12 17:36 githash=d33ece4 {quote} In iPhone Simulator 5.1. I am able to successfully interact with the scroll view inside of the table view row, and I am able to scroll the table view row. Further, hitting the bounds of the scroll view properly hand off the scroll event to the table view.
  9. Neeraj Gupta 2012-04-27

    This issue has been fixed somewhere along the line. Marking this bug resolved based on Dawson's testing.
  10. Natalie Huynh 2012-06-05

    Tested with 2.1.0.v20120605113335 on iPhone 3gs 4.3

JSON Source