[TIMOB-18281] iOS: Popover with OptionDialog does not dismiss when option dialog is open
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | None |
Status | Closed |
Resolution | Won't Fix |
Resolution Date | 2014-12-29T19:24:30.000+0000 |
Affected Version/s | Release 3.5.0 |
Fix Version/s | n/a |
Components | iOS |
Labels | qe-3.5.0 |
Reporter | Satyam Sekhri |
Assignee | Ingo Muschenetz |
Created | 2014-12-22T10:10:31.000+0000 |
Updated | 2017-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();
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
Closing ticket as the issue will not fix.