Skip to content
This repository was archived by the owner on Oct 9, 2018. It is now read-only.
This repository was archived by the owner on Oct 9, 2018. It is now read-only.

PlayBook's swipe-down menu stops working after a pushScreen or popScreen is triggered on a menu item #93

@asiayeah

Description

@asiayeah

For bbui-0.9.1.js

When a pushScreen() or popScreen() is triggered on a menu-item's onclick handler, PlayBook's swipe-down menu will stop working.

The problem is because bb.menuBar.menuOpen remains as true in this case.

The following patch will work:

        clearMenu: function(){
                if(window.blackberry){
                        if(bb.menuBar.menu && (bb.device.isPlayBook || bb.device.isBB10) && blackberry.app.event){
                                blackberry.app.event.onSwipeDown('');
                                document.removeEventListener("click", bb.menuBar.globalClickHandler, false);
                                bb.menuBar.menu.parentNode.removeChild(bb.menuBar.menu);
                                bb.menuBar.menu = false;
                                bb.menuBar.menuOpen = false; // Add this, so that menuOpen will be false
                        }else if(blackberry.ui && blackberry.ui.menu){
                                blackberry.ui.menu.clearMenuItems();
                        }
                }
        }

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions