Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-18281] iOS: Popover with OptionDialog does not dismiss when option dialog is open

GitHub Issuen/a
TypeBug
PriorityNone
StatusClosed
ResolutionWon't Fix
Resolution Date2014-12-29T19:24:30.000+0000
Affected Version/sRelease 3.5.0
Fix Version/sn/a
ComponentsiOS
Labelsqe-3.5.0
ReporterSatyam Sekhri
AssigneeIngo Muschenetz
Created2014-12-22T10:10:31.000+0000
Updated2017-03-20T17:13:42.000+0000

Description

This is a Regression as the issue does not occur on 3.4.1.GA The popover with an option dialog in it, does not dismiss when clicked outside the popover. This happens only when the option dialog is visible in the popover Steps to Reproduce; 1. Create and launch the app with code below 2. Click on 'Click me' button. The popover is shown 3. On the popover, click on the 'Click for Option Dialog' button. The option dialog is shown in the popover. 4. Now, with option dialog still shown, click outside the popover to dismiss it Actual Result: The popover does not get dismissed till the option dialog is shown Expected Result: The popover should dismiss whenever we click outside the popover.
var _window=Ti.UI.createWindow({
	backgroundColor:'white'
});

var btn = Ti.UI.createButton({
	title : 'Click me'
});

btn.addEventListener('click', function(e) {

	var popWin = Ti.UI.createWindow({
		backgroundColor : 'white'
	});

	var popBtn = Ti.UI.createButton({
		title : 'Click for Option Dialog'
	});

	popWin.add(popBtn);

	var pop = Ti.UI.iPad.createPopover({
		contentView : popWin
	});

	popBtn.addEventListener('click', function(e) {
		Ti.UI.createOptionDialog({
			options : ['a', 'b']
		}).show({
			view : popBtn
		});
	});

	pop.show({
		view : btn
	});
});

_window.add(btn);
_window.open();

Comments

  1. Vishal Duggal 2014-12-29

    We explicitly disabled the dismissal of popovers when they are acting as presenters of Modal View Controllers. In iOS8 option dialogs are ViewControllers so the popover will not be dismissed as long as the option dialog is up. If we do dismiss the popover we will run into memory leaks and rotation problems
  2. Lee Morris 2017-03-20

    Closing ticket as the issue will not fix.

JSON Source