Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TIMOB-25979] Android: Changing index break events on TableViewRow #10124

Merged
merged 2 commits into from Jun 21, 2018

Conversation

ypbnv
Copy link
Contributor

@ypbnv ypbnv commented Jun 20, 2018

JIRA: https://jira.appcelerator.org/browse/TIMOB-25979

Description:
In a TableView, updating a row that is more than once in the table with another row detaches the parent of the view, resulting in click/touch events not working properly.

Note:
No unit tests because the bug requires user interaction.

Test case:
app.js

var window = Ti.UI.createWindow();

var container = Ti.UI.createView({	
	backgroundColor: '#333'
});
var tableView = Ti.UI.createTableView({
	backgroundColor: 'white'
});
var row1 = Ti.UI.createTableViewRow({
	height: 50,
	backgroundColor: 'red',
	className: 'scheduled'
});
var row2 = Ti.UI.createTableViewRow({
	height: 50,
	backgroundColor: 'green',
	className: 'scheduled'
});

var row3 = Ti.UI.createTableViewRow({
	height: 50,
	backgroundColor: 'yellow',
	className: 'scheduled'
});

tableView.appendRow(row1);
tableView.appendRow(row2);
tableView.appendRow(row3);
tableView.updateRow(0, row3); //this row will stop to react on events
tableView.updateRow(1, row2);
tableView.updateRow(2, row1);

container.add(tableView);
window.add(container);
window.open();

tableView.addEventListener('click', function() {alert('clickFromTableView');});
container.addEventListener('click', function() {alert('clickFromContainer');});

@ypbnv ypbnv added this to the 7.4.0 milestone Jun 20, 2018
@ypbnv ypbnv requested a review from garymathews June 20, 2018 12:31
@build
Copy link
Contributor

build commented Jun 20, 2018

Messages
📖

💾 Here's the generated SDK zipfile.

Generated by 🚫 dangerJS

Copy link
Contributor

@garymathews garymathews left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FT: PASS
CR: PASS

@hansemannn hansemannn merged commit 9e0a7dc into tidev:master Jun 21, 2018
@jquick-axway jquick-axway modified the milestones: 7.4.0, 7.5.0 Aug 24, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants