[TIMOB-18477] IOS: A Popover will swallow any OptionDialog created
| GitHub Issue | n/a |
|---|---|
| Type | Bug |
| Priority | n/a |
| Status | Open |
| Resolution | Unresolved |
| Affected Version/s | Release 3.5.0 |
| Fix Version/s | n/a |
| Components | iOS |
| Labels | ios, ipad, optiondialog, popover |
| Reporter | Pier Paolo Ramon |
| Assignee | Unknown |
| Created | 2015-01-29T11:12:45.000+0000 |
| Updated | 2018-02-28T19:55:09.000+0000 |
Description
When a Popover is opened and attached to one of the window’s
rightNavItems and an OptionDialog is opened, the OptionDialog is opened *inside* the Popover. This does not happen if you open *another OptionDialog* without closing the one inside the Popover.
Steps
Click on "options"
Click on "popover"
Click on "options"
Click on "options" again
Click on "options" a third time
Expected results
the OptionDialog opens (correctly attached to the "options" button)
the Popover opens
*another* OptionDialog (correctly attached) opens *on top* of the Popover
the second OptionDialog *closes*
*another* OptionDialog (correctly attached) opens *on top* of the Popover
Actual result
the OptionDialog opens (correctly attached to the "options" button)
the Popover opens
another OptionDialog opens *inside* the Popover, as a modal iPhone-esque OptionDialog
another OptionDialog opens (correctly attached to the "options" button)
the last OptionDialog closes
Attached Code
var popoverButton = Ti.UI.createButton({ title: 'popover' });
var optionsButton = Ti.UI.createButton({ title: 'options' });
var window = Ti.UI.createWindow({
backgroundColor: 'gray',
rightNavButtons: [ popoverButton, optionsButton ]
});
var navWindow = Ti.UI.iOS.createNavigationWindow({
window: window
});
optionsButton.addEventListener('click', function () {
var options = Ti.UI.createOptionDialog({
title: 'Options',
options: [ 'A', 'B', 'C' ]
});
options.show({ view: optionsButton });
});
popoverButton.addEventListener('click', function () {
var contentView = Ti.UI.createLabel({
text: 'this is the content',
width: 300,
height: 300,
textAlign: Ti.UI.TEXT_ALIGNMENT_CENTER
});
var popover = Ti.UI.iPad.createPopover({
contentView: contentView
});
popover.show({ view: popoverButton });
});
navWindow.open();
This is similar in scope to TIMOB-18281, but actually the issue is different. A solution to TC-5261 could improve the situation.