Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-1810] iOS: IPad Multiple Popovers

GitHub Issuen/a
TypeBug
PriorityTrivial
StatusClosed
ResolutionFixed
Resolution Date2011-12-08T15:27:41.000+0000
Affected Version/sRelease 1.8.0
Fix Version/sSprint 2011-49, Release 1.8.0.1
ComponentsiOS
Labelsbranch-5062
ReporterDawson Toth
AssigneeBlain Hamon
Created2011-04-15T03:02:58.000+0000
Updated2011-12-08T23:27:18.000+0000

Description

To Reproduce:
Create a single button bar and add two buttons to it.
Create event listeners to open popovers for each.
Click button 1
Click button 2

Result: Both popovers are open at once, the the most recent overlapping.
Expected: All other popovers should close before opening another (either close on first click, open new on second, or close/open in one press).

EXTRA CREDIT:
If buttons are on separate button bars, popovers behave as expected. First click closes existing popover, second opens new one.

Attachments

FileDateSize
Screenshot 2011.12.06 15.09.08.png2011-12-06T15:18:04.000+000049985
Screenshot 2011.12.06 15.13.01.png2011-12-06T15:18:04.000+000041180

Comments

  1. Kevin McGrath 2011-04-15

    Some further information.

    It seems that if the popover is attached to a button on a bar that the above behavior can occur. However, wrapping the button in a view on that same bar (while keeping the event tied to the button) provides the click-on/click-off behavior.

  2. Stephen Tramer 2011-04-15

    Possibly still valid. Requires test/R&D.

  3. Dawson Toth 2011-10-31

    Definitely still a problem. Just tested with CI from the 28th, and I can reproduce with the following code:

    Reproduction

    Drop the following in an app.js. Follow the numbered steps.
       var win = Ti.UI.createWindow({
           backgroundColor: '#fff',
           leftNavButton: Ti.UI.createButton({
               title: '1. Touch Me'
           }),
           rightNavButton: Ti.UI.createButton({
               title: '2. Touch Me'
           })
       });
       
       var leftPopover = Ti.UI.iPad.createPopover({
           width: 300, height: 45 * 3
       });
       win.leftNavButton.addEventListener('click', function() {
           leftPopover.show({ view: win.leftNavButton });
       });
       
       var rightPopover = Ti.UI.iPad.createPopover({
           width: 300, height: 45 * 3
       });
       win.rightNavButton.addEventListener('click', function() {
           rightPopover.show({ view: win.rightNavButton });
       });
       
       var tab = Ti.UI.createTab({
           window: win
       });
       var tabGroup = Ti.UI.createTabGroup();
       tabGroup.addTab(tab);
       tabGroup.open();
       

    Tested With

    version=1.8.0 timestamp=10/28/11 15:46 githash=79c174b...
  4. Eric Merriman 2011-12-06

    With SDK 1.8.0.1.v20111205164258 this appears to be fixed, but if you open one popover as you rotate the device, it's possible to get two popovers. You can also get one of the two popovers in this case to appear away from the button. Also, the popover when rotating may appear on the opposite button from the one pressed to invoke it. See attached screenshots. Occurred on both 4.3.5 and 5.0 iPad 2.
  5. Blain Hamon 2011-12-08

    Pull request pending, #884
  6. Michael Pettiford 2011-12-08

    Tested on Ti Studio 1.0.7.201112080131 
Ti Mob SDK 1.8.0.1.v20111208162314 
OSX Lion iPad 2 OS 4.3.5 Expected behavior is shown where there is only a single popover visible at one time

JSON Source