Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-19037] Windows: Reopening a window from a tableview does not work until another window is opened

GitHub Issuen/a
TypeBug
PriorityNone
StatusClosed
ResolutionFixed
Resolution Date2015-06-24T14:02:50.000+0000
Affected Version/sRelease 4.1.0
Fix Version/sRelease 4.1.0
ComponentsWindows
Labelsqe-4.1.0
ReporterEwan Harris
AssigneeGary Mathews
Created2015-06-17T21:38:59.000+0000
Updated2015-06-26T01:38:25.000+0000

Description

Description

When using a tableview, if on click a tableview opens a window the windows will not open again until another row is clicked, for example considering the following code, if I tap on the row 'Apples' a window will open, when I close that window it will not open again until I tap another row
var win = Ti.UI.createWindow({backgroundColor:'black'});
 
var tableData = [ {title: 'Apples'}, {title: 'Bananas'}, {title: 'Carrots'}, {title: 'Potatoes'} ]
 
var table = Ti.UI.createTableView({
  data: tableData
});
 
table.addEventListener('click', function(e){

    var win2 = Ti.UI.createWindow({backgroundColor:'red'});
    var lbl = Ti.UI.createLabel({
        text: 'HELLO!',
        color:'black',
        width: 'auto',
        height: 'auto'
    });
    win2.add(lbl);

    lbl.addEventListener('click',function(){
        win2.close();
    });
    win2.open();

});
 
win.add(table);
win.open();

Steps To Reproduce

1. Replace the attached app.js with the above code 2. Build to a device or emulator 3. Tap on Apples 4. Tap on the 'HELLO' label to close the window 5. Tap on Apples again 6. Tap on Potatoes 7. Tap on the 'HELLO' label to close the window 8. Tap on Apples

Actual Result

3. A window will open 5. The window will not open 6. A window will open 8. A window will open

Expected Result

A window should open every time I tap the tableview

Comments

  1. Gary Mathews 2015-06-24

    PR: https://github.com/appcelerator/titanium_mobile_windows/pull/318
  2. Lokesh Choudhary 2015-06-26

    Verified the fix. Closing. Environment: Appc Studio: 4.1.0.201506251044 Ti SDK: 4.1.0.v20150625131457 Ti CLI: 4.0.1 Alloy: 1.6.2 Windows: 8.1 Enterprise 64-bit APPC NPM: 4.1.0-1 APPC CLI: 4.1.0-3 Device: Nokia Lumia 928 - Windows Phone 8.1 Windows emulator : 8.1

JSON Source