Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-16346] iOS7: OptionDialog last option not visible

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionInvalid
Resolution Date2014-02-03T20:12:30.000+0000
Affected Version/sRelease 3.2.1
Fix Version/s2014 Sprint 03, 2014 Sprint 03 API
ComponentsiOS
LabelssupportTeam
ReporterEduardo Gomez
AssigneeVishal Duggal
Created2014-01-30T18:27:05.000+0000
Updated2017-03-03T21:40:59.000+0000

Description

Issue description

We just observed that in iPad the option dialog doesn't show the last option where as its working properly in iPhone.

Snippet code

Ti.UI.setBackgroundColor('white');
  var win = Ti.UI.createWindow({
  title: 'Click window to test',
  backgroundColor: 'white',
  exitOnClose: true,
  fullscreen: false
});

var opts = {
  title: 'Delete File?',
  cancel: 2
};

var isAndroid = Ti.Platform.osname == 'android';

if(isAndroid){
  opts.options = ['Confirm', 'Cancel'];
  opts.buttonNames = ['Help'];
} else {
  opts.options = ['Confirm', 'Help', 'Cancel'];
}

win.addEventListener('click', function(e){
  var dialog = Ti.UI.createOptionDialog(opts).show();
});
win.open();

Appcelerator docs

http://docs.appcelerator.com/titanium/latest/#!/api/Titanium.UI.OptionDialog-property-cancel

Environment

{quote} egomezmbp:tools egomez$ ti status Titanium Command-Line Interface, CLI version 3.2.1-beta3, Titanium SDK version 3.2.1.v20140121132444 Copyright (c) 2012-2014, Appcelerator, Inc. All Rights Reserved. {quote}

Comments

  1. Vishal Duggal 2014-02-03

    This is native behavior. Cancel button is not shown on the iPAD. Our documentation already notes it.To get the cancel button to show set cancel to -1 on iPAD
  2. Eric Merriman 2017-03-03

    Closing as invalid.

JSON Source