Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-2096] Popover hide doesn't work

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionCannot Reproduce
Resolution Date2012-07-20T14:08:44.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsiOS
Labelshide, ios, ipad, popover
Reporterjohnmcknight (at yahoo)
AssigneeNeeraj Gupta
Created2011-04-15T03:10:22.000+0000
Updated2017-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

  1. 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.

  2. Neeraj Gupta 2012-07-21

    Does not reproduce with release 2.1.0.
  3. Lee Morris 2017-03-09

    Closing ticket as the issue cannot be reproduced.

JSON Source