Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-3537] iPad - OptionDialog crash if modal window

GitHub Issuen/a
TypeBug
PriorityTrivial
StatusClosed
ResolutionFixed
Resolution Date2011-10-27T15:52:29.000+0000
Affected Version/sRelease 1.7.0
Fix Version/sSprint 2011-24, Release 1.8.0
ComponentsiOS
Labelsdefect, ipad, optiondialog
ReporterPedro Enrique
AssigneeBlain Hamon
Created2011-04-15T03:46:25.000+0000
Updated2011-10-27T15:52:29.000+0000

Description

On iPad only, when an options dialog is showed, if the window is a modal window the app will crash.

Sample code:

var win = Titanium.UI.createWindow({
    backgroundColor:'#f5dcd2'
});

var btn = Ti.UI.createButton({
    height:50,
    width:200,
    title:'chick here'
});

var dialog = Titanium.UI.createOptionDialog({
    options:['Save to Gallery', 'Email Photo', 'Share on Facebook', 'Cancel'],
    destructive:3,
    cancel:3,
    title:'Share This Photo'
});

btn.addEventListener('click', function(){
    dialog.show();
});

win.add(btn);

win.open({modal:true});

A helpdesk ticket (XJH-91382-789) encountered this problem.

Tested on 1.6.1, 1.6.2, and 1.7.0
iPad Simulator 4.3

Comments

  1. Blain Hamon 2011-06-14

    This was due to the root view controller's view not being in view during modal windows.
  2. Alan Vaghti 2011-09-08

    Closing. Passed on an iPad 4.3.5 and an iPad 2 4.3.5.

JSON Source