cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sergey Grebnov (JIRA)" <>
Subject [jira] [Commented] (CB-7500) executeScript with callback kills/blurs inAppBrowser window after callback exit
Date Wed, 03 Feb 2016 19:41:40 GMT


Sergey Grebnov commented on CB-7500:

Changing logic above to use the same logic for my device I was able to repro original problem
and verify fix proposed. But I think better approach is to wrap call in function instead of
using `var r=`
jsWrapper = String.format("(function(){prompt(JSON.stringify([eval(%%s)]), 'gap-iab://%s')})()",

> executeScript with callback kills/blurs inAppBrowser window after callback exit
> -------------------------------------------------------------------------------
>                 Key: CB-7500
>                 URL:
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Plugin InAppBrowser
>    Affects Versions: 3.5.0
>         Environment: Android 4.4.2 Samsung Galaxy Tab S
>            Reporter: Andreas Imhof
>            Assignee: Sergey Grebnov
>              Labels: Android, Triaged, patch
>   Original Estimate: 20m
>  Remaining Estimate: 20m
> Calling Javascript executeScript (inAppBrowser.js) WITH a callback into an inAppBrowser
window kills/blurs this IAB window after the callback exits. Something like this also is mentioned
in the author's comment in method 'injectDeferredObject' in '' on line 254.
> After inverstigating, I accidentally found a work-around/solution which helped on my
Android 4.4.2 Samsung Galagy Tab S.
> In '' on line 162:
> jsWrapper = String.format("prompt(JSON.stringify([eval(%%s)]), 'gap-iab://%s')", callbackContext.getCallbackId());
> the 'prompt' statement should be assigned to a variable like:
> jsWrapper = String.format("var r=prompt(JSON.stringify([eval(%%s)]), 'gap-iab://%s')",
> Adding 'var r=' prevents from InAppBrowser window being killed. 
> Don't know why. Tell me...   :-)

This message was sent by Atlassian JIRA

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message