[TIMOB-11493] MobileWeb: remove for a child view does not work
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Duplicate |
Resolution Date | 2012-10-25T00:31:52.000+0000 |
Affected Version/s | Release 2.1.2, Release 2.1.3 |
Fix Version/s | n/a |
Components | MobileWeb |
Labels | n/a |
Reporter | Amuktha Akkinepally |
Assignee | Chris Barber |
Created | 2012-10-15T22:38:33.000+0000 |
Updated | 2014-06-19T12:44:44.000+0000 |
Description
The Child view remove() does not work on mobileWeb.
Steps to reproduce:
1. Load the following app.js 2. Run it on iPhone, Android Emulator 3. Now run on Mobile Browser. Expected Result: Should show the number of views remaining accordingly lioke in iOS and Android. Actual Results: Always shows that there are 6 views remaining.
var win = Ti.UI.createWindow({
backgroundColor:'white'
});
var v1 = Ti.UI.createView({
height : 40,
width : 200,
backgroundColor : '#336699',
top : 10,
borderRadius : 10
});
win.add(v1);
var v2 = Ti.UI.createView({
height : 40,
width : 200,
backgroundColor : '#ff0000',
top : 60,
borderRadius : 10
});
win.add(v2);
var v3 = Ti.UI.createWebView({
height : 40,
width : 200,
backgroundColor : '#ff9900',
top : 110,
borderRadius : 10,
html : '<html><body><div style="color:#fff;text-align:center">FOO</div></body></html>'
});
win.add(v3);
var b1 = Ti.UI.createButton({
height : 40,
width : 200,
title : 'Remove View 1',
top : 160
});
win.add(b1);
b1.addEventListener('click', function() {
win.remove(v1);
alert("views remaining:" + win.children.length);
});
var b2 = Ti.UI.createButton({
height : 40,
width : 200,
title : 'Remove View 2',
top : 210
});
win.add(b2);
b2.addEventListener('click', function() {
win.remove(v2);
alert("views remaining:" + win.children.length);
});
var b3 = Ti.UI.createButton({
height : 40,
width : 200,
title : 'Remove View 3',
top : 260
});
win.add(b3);
b3.addEventListener('click', function() {
win.remove(v3);
alert("views remaining:" + win.children.length);
});
win.open();
Duplicate of TIMOB-11559