From a45dbc80b404933fe798127cba5d3668a2dbcad1 Mon Sep 17 00:00:00 2001 From: Jesse MacFadyen Date: Wed, 4 Mar 2015 00:26:57 -0800 Subject: [PATCH] updated docs, set hardwareback default to true --- doc/index.md | 1 + src/android/InAppBrowser.java | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/index.md b/doc/index.md index f396f4d..c607d89 100644 --- a/doc/index.md +++ b/doc/index.md @@ -94,6 +94,7 @@ instance, or the system browser. - __hidden__: set to `yes` to create the browser and load the page, but not show it. The loadstop event fires when loading is complete. Omit or set to `no` (default) to have the browser open and load normally. - __clearcache__: set to `yes` to have the browser's cookie cache cleared before the new window is opened - __clearsessioncache__: set to `yes` to have the session cookie cache cleared before the new window is opened + - __hardwareback__: set to `yes` to use the hardware back button to navigate backwards through the `InAppBrowser`'s history. If there is no previous page, the `InAppBrowser` will close. The default value is `yes`, so you must set it to `no` if you want the back button to simply close the InAppBrowser. iOS only: diff --git a/src/android/InAppBrowser.java b/src/android/InAppBrowser.java index 09bd55b..f90bdc7 100644 --- a/src/android/InAppBrowser.java +++ b/src/android/InAppBrowser.java @@ -91,7 +91,7 @@ public class InAppBrowser extends CordovaPlugin { private boolean openWindowHidden = false; private boolean clearAllCache= false; private boolean clearSessionCache=false; - private boolean hadwareBackButton=false; + private boolean hadwareBackButton=true; /** * Executes the request and returns PluginResult.