[TIMOB-2096] Popover hide doesn't work
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Cannot Reproduce |
Resolution Date | 2012-07-20T14:08:44.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | iOS |
Labels | hide, ios, ipad, popover |
Reporter | johnmcknight (at yahoo) |
Assignee | Neeraj Gupta |
Created | 2011-04-15T03:10:22.000+0000 |
Updated | 2017-03-09T22:46:10.000+0000 |
Description
This example from the Q/A shows the issue. If you call popover.hide() the popover will remain visible. This example is tying into the orientationchange event but it also fails in a click event.
var masterWindow = Ti.UI.createWindow ({
backgroundColor:'#000'
});
var navButton = Ti.UI.createButton({
title:'A Button'
});
var detailWindow = Ti.UI.createWindow({
backgroundColor:'#fff',
top:0,
title:'Test',
leftNavButton:navButton
});
var masterDetail = Ti.UI.iPhone.createNavigationGroup(
{
window: detailWindow,
right:0,
top:0
});
masterWindow.add(masterDetail);
var navPopover = Ti.UI.iPad.createPopover({
width:320,
height:850,
navBarHidden:true
});
navButton.addEventListener('click', function(){
navPopover.show({view:navButton});
});
Ti.Gesture.addEventListener('orientationchange',function(e)
{
if(e.orientation == 3 || e.orientation == 4)
{
navPopover.hide();
}
});
masterWindow.open();
Comments
- johnmcknight (at yahoo) 2011-04-15
The correct call to hide should have looked like this.
navPopover.hide({animated: true});
But it doesn't seem to behave as expected in 1.4.1 and 1.4.2.
- Neeraj Gupta 2012-07-21 Does not reproduce with release 2.1.0.
- Lee Morris 2017-03-09 Closing ticket as the issue cannot be reproduced.