Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-10487] MobileWeb: tableView deleteRow Uncaught TypeError: Cannot read property 'section' of undefined

GitHub Issuen/a
TypeBug
PriorityLow
StatusClosed
ResolutionWon't Fix
Resolution Date2017-06-26T22:01:32.000+0000
Affected Version/sRelease 2.0.2, Release 2.1.2
Fix Version/sn/a
ComponentsMobileWeb
Labelsapi, qe-mw082012
ReporterDustin Hyde
AssigneeChris Barber
Created2012-08-17T16:35:37.000+0000
Updated2018-04-04T23:20:23.000+0000

Description

Under certain conditions, tableView deleteRow fails with Uncaught TypeError: Cannot read property 'section' of undefined. This is not a regression. This does not occur in iOS or Android. Test project attached. Debug Source:
		_removeRow: function(index) {
			var location = this._calculateLocation(index);
			this._unpublish(location.section._rows._children[2 * location.localIndex + 1]);
Uncaught TypeError: Cannot read property 'section' of undefined
			if (location) {
				location.section._removeAt(location.localIndex);
			}
		},
Steps to Reproduce: 1. Run attached project. 2. Click Returns. 3. Wait for ACS query. 4. Click top row. Actual Result: Runtime Error. Expected Result: Top row should be removed from top TableView and added to bottom TableView. Note: This does not occur using simplified code:
var win = Ti.UI.createWindow({
    backgroundColor : 'white'
});
 
var table1 = Ti.UI.createTableView({
    top : 0,
    left : 0,
    width : '100%',
    height : '50%'
});
 
var row = Ti.UI.createTableViewRow({
    title : 'click top row, then bottom row'
});
 
table1.appendRow(row);
 
var table2 = Ti.UI.createTableView({
    bottom : 0,
    left : 0,
    width : '100%',
    height : '50%'
});
 
win.add(table1);
win.add(table2);
 
table1.addEventListener('click', function(e) {
    table1.deleteRow(e.index);
    table2.appendRow(e.row);
});
 
win.open();

Attachments

FileDateSize
InventoryApp.zip2012-08-17T16:35:37.000+00003127771

Comments

  1. Lee Morris 2017-06-26

    Resolving as "Won't Fix" as MobileWeb has been deprecated.
  2. Eric Merriman 2018-04-04

    Closing as will not fix.

JSON Source