Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-1444] iPad - OptionsDialog - fails to display last option / height bug

GitHub Issuen/a
TypeBug
PriorityLow
StatusClosed
ResolutionWon't Fix
Resolution Date2017-07-31T22:03:19.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsiOS
Labelsdefect, ios, ipad, reported-1.6.0, rplist
ReporterRavenLife
AssigneeEric Merriman
Created2011-04-15T02:53:01.000+0000
Updated2017-07-31T22:10:52.000+0000

Description

Just created a new two button optiondialog on an ipad webview.

when it is shown on the page only the first of the options is shown

var dialog = Titanium.UI.createOptionDialog({

    title: 'you have options',
    options: ['option 1','option 2'],
    destructive:0,
    cancel:1
});

dialog.show();

if you place a third option the resulting optiondialog has 1 and a half buttons,

var dialog = Titanium.UI.createOptionDialog({

    title: 'you have options',
    options: ['Option 1','Option 2',''],
    destructive:0,
    cancel:1
});

dialog.show();

images attached for your convenience

Attachments

FileDateSize
2options.png2011-04-15T02:53:02.000+000022297
3options.png2011-04-15T02:53:02.000+000025604

Comments

  1. Dawson Toth 2011-04-15

    Additional Details

    If you remove the "cancel: 1" property, both options will be shown.

       Ti.UI.createWindow({backgroundColor: '#fff'}).open();
       
       Titanium.UI.createOptionDialog({
           title: 'Hello',
           options: ['Option 1','Option 2']
       }).show();
       

    Associated Helpdesk Ticket

    http://developer.appcelerator.com/helpdesk/view/68711">http://developer.appcelerator.com/helpdesk/view/68711

  2. Blain Hamon 2012-02-24

    This actually is due to the native iPad design. Will be updating documentation to further clarify what happens.
  3. Blain Hamon 2012-03-05

    Github pull #1454 updates the documentation as mentioned: {quote} On iPad, the cancel button *must* be -1 or the last button. If the cancel button is used (IE, not -1) then the cancel button will be removed from option dialog. As of 1.9, this value will be used for the index when click is fired via outside taps or hide, even using -1 if no cancel button was provided. {quote}
  4. Blain Hamon 2012-03-05

    Documentation in 7656 solves this issue.
  5. Blain Hamon 2012-03-05

    See fix for TIMOB-7656.
  6. Neha Chhabra 2012-05-08

    Tested with Titanium SDK: 2.0.2.v20120505151714 Tested with Titanium Studio: 2.0.2.201205041518 Platform & version: iOS 5.1 Device Details: iPad2 Host Operating System: OSX 10.7.3 For the Test: KitchenSink>Base UI>Views>Options Dialog: Click on show dialog 1 button brings up a dialog with only 2 options instead of three (same behavior as the test above). Similarly,on click of Modify and show dialog button, it brings up only 3 options instead of four.
  7. Blain Hamon 2012-06-21

    Any reason this was reopened without explanation? If not, will be re-resolving this as duplicate.
  8. Vishal Duggal 2012-06-22

    Needs a doc update for iPAD behavior. See TIDOC-684
  9. Shyam Bhadauria 2012-08-29

    Environment used for verification - Tested with Titanium SDK: 2.2.0.v20120828153312 Tested with Titanium  Studio: 2.1.2.201208201549 Device - iOS 5.1 simulator Machine OS - MAC 10.8
  10. Olga Romero 2012-10-13

    Hi Blain, This issue still exists on iPad. I am reopening this bug. Tested on: Titanium Studio, build: 3.0.0.201210090117 Titanium SDK, build: 3.0.0.v20121012174449 Devices: iPad3 ios 5.1 iPad3 ios 6.0
  11. Lee Morris 2017-07-31

    Closing due to inactivity. If this issue still exists, please raise a new ticket.
  12. Lee Morris 2017-07-31

    Closing due to inactivity. If this issue still exists, please raise a new ticket.

JSON Source