user1872994
user1872994

Reputation: 71

phonegap InappBrowser not working with viewport

I'm using PhoneGap 2.3 and now when I open a new URL with 'window.open', my URL opens in the inAppBrowser.

In this browser, my viewport metatag is not working but when I put my URL in a safari browser the viewport is working fine.

In PhoneGap, I have set to 'yes' for 'enableViewportScale' but it doesn't work.

Somebody have a solution?

Thanks

Upvotes: 5

Views: 4563

Answers (2)

Alan124
Alan124

Reputation: 31

Kevin is right

window.open('http://apache.org', '_blank', 'location=no,EnableViewPortScale=yes');

(ok on iOS only)

Upvotes: 1

Kevin Kulla
Kevin Kulla

Reputation: 460

enableViewportScale was added in 2.4.0 so you should just need to upgrade.

http://docs.phonegap.com/en/2.4.0/cordova_inappbrowser_inappbrowser.md.html#InAppBrowser

(under window.open)

EDIT:

Also, the way to call the options is one singular string, not an object:

So it should look like this:

'location=no,enableViewportScale=yes'

Upvotes: 9

Related Questions