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 only works on the 1st screen, but not in the 2nd screen #92

@asiayeah

Description

@asiayeah

I am testing the swipe-down menu on PlayBook with bbui-0.9.1.js.

It works fine on the first screen but the swipe down menu does not show up on the 2nd screen.

Tracing through the codes, so far I've identified 1 issue in bb.menuBar.createSwipeMenu():

                // Add the overlay for trapping clicks on items below
                if (!bb.screen.overlay) {
                        bb.screen.overlay = document.createElement('div');
                        bb.screen.overlay.setAttribute('class','bb-bb10-context-menu-overlay');
                        screen.appendChild(bb.screen.overlay);
                        bb.menuBar.menu.overlay = bb.screen.overlay;
                }

The followings are the patch:

@@ -576,9 +576,9 @@
                if (!bb.screen.overlay) {
                        bb.screen.overlay = document.createElement('div');
                        bb.screen.overlay.setAttribute('class','bb-bb10-context-menu-overlay');
-                       screen.appendChild(bb.screen.overlay);
-                       bb.menuBar.menu.overlay = bb.screen.overlay;
                }
+               screen.appendChild(bb.screen.overlay);
+               bb.menuBar.menu.overlay = bb.screen.overlay;
        },

Without the patch, showMenuBar() will throw an Exception as bb.menuBar.menu.overlay is null.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions