Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-18477] IOS: A Popover will swallow any OptionDialog created

GitHub Issuen/a
TypeBug
Priorityn/a
StatusOpen
ResolutionUnresolved
Affected Version/sRelease 3.5.0
Fix Version/sn/a
ComponentsiOS
Labelsios, ipad, optiondialog, popover
ReporterPier Paolo Ramon
AssigneeUnknown
Created2015-01-29T11:12:45.000+0000
Updated2018-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();

Comments

  1. Pier Paolo Ramon 2015-01-29

    This is similar in scope to TIMOB-18281, but actually the issue is different. A solution to TC-5261 could improve the situation.

JSON Source