You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by ma...@apache.org on 2026/05/11 07:48:03 UTC

(cordova-plugin-inappbrowser) branch master updated: fix(android): change callback context only on non-whitelisted urls or target `_blank` (#1147)

This is an automated email from the ASF dual-hosted git repository.

GitToTheHub pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cordova-plugin-inappbrowser.git


The following commit(s) were added to refs/heads/master by this push:
     new 694adb0  fix(android): change callback context only on non-whitelisted urls or target `_blank` (#1147)
694adb0 is described below

commit 694adb070d239adb812ead0d0cacc99dfa080c56
Author: Manuel Beck <ma...@outlook.de>
AuthorDate: Mon May 11 09:47:57 2026 +0200

    fix(android): change callback context only on non-whitelisted urls or target `_blank` (#1147)
    
    - Fixes https://github.com/apache/cordova-plugin-inappbrowser/issues/752
    - Generated-By: GPT-5.3-Codex
---
 src/android/InAppBrowser.java | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/android/InAppBrowser.java b/src/android/InAppBrowser.java
index 90c21f6..04fe57b 100644
--- a/src/android/InAppBrowser.java
+++ b/src/android/InAppBrowser.java
@@ -166,7 +166,6 @@ public class InAppBrowser extends CordovaPlugin {
      */
     public boolean execute(String action, CordovaArgs args, final CallbackContext callbackContext) throws JSONException {
         if (action.equals("open")) {
-            this.callbackContext = callbackContext;
             final String url = args.getString(0);
             String t = args.optString(1);
             if (t == null || t.equals("") || t.equals(NULL)) {
@@ -239,6 +238,7 @@ public class InAppBrowser extends CordovaPlugin {
                         // load in InAppBrowser
                         else {
                             LOG.d(LOG_TAG, "loading in InAppBrowser");
+                            InAppBrowser.this.callbackContext = callbackContext;
                             result = showWebPage(url, features);
                         }
                     }
@@ -250,6 +250,7 @@ public class InAppBrowser extends CordovaPlugin {
                     // BLANK - or anything else
                     else {
                         LOG.d(LOG_TAG, "in blank");
+                        InAppBrowser.this.callbackContext = callbackContext;
                         result = showWebPage(url, features);
                     }
 


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org