channa ly
channa ly

Reputation: 9937

cordova themeable browser does not show toolbar in iOS

I developing hybrid app with cordova and angular material design using cordova themeablebrowser which is a richer version of cordova in app browser.

The code to invoke a page look like this:

cordova.ThemeableBrowser.open('https://bookmebus.com/faq','_self', {
    statusbar: {
        color: '#ffffffff'
    },
    toolbar: {
        height: 44,
        color: '#f0f0f0ff'
    },
    title: {
        color: '#003264ff',
        showPageTitle: true
    },
    backButton: {
        image: 'back',
        imagePressed: 'back_pressed',
        align: 'left',
        event: 'backPressed'
    },
    forwardButton: {
        image: 'forward',
        imagePressed: 'forward_pressed',
        align: 'left',
        event: 'forwardPressed'
    },
    closeButton: {
        image: 'close',
        imagePressed: 'close_pressed',
        align: 'left',
        event: 'closePressed'
    },
    customButtons: [
        {
            image: 'share',
            imagePressed: 'share_pressed',
            align: 'right',
            event: 'sharePressed'
        }
    ],
    menu: {
        image: 'menu',
        imagePressed: 'menu_pressed',
        title: 'Test',
        cancel: 'Cancel',
        align: 'right',
        items: [
            {
                event: 'helloPressed',
                label: 'Hello World!'
            },
            {
                event: 'testPressed',
                label: 'Test!'
            }
        ]
    },
    backButtonCanClose: true
})

In android it shows toolbar with page title as expected. I don't really have any idea why this toolbar is missing in iOS as shown below.

enter image description here

Upvotes: 0

Views: 1562

Answers (2)

Deybi Chavarria
Deybi Chavarria

Reputation: 1

When you use the target _self in the open themeable browser, you won't see the toolbar, you should use _blank.

Upvotes: 0

channa ly
channa ly

Reputation: 9937

I remove the plugin and install with r0.2.15 then it works.

cordova plugin add https://github.com/initialxy/cordova-plugin-themeablebrowser.git#r0.2.15

Upvotes: 0

Related Questions