[
https://issues.apache.org/jira/browse/CB-9845?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14974020#comment-14974020
]
Sebastian Betzinger commented on CB-9845:
-----------------------------------------
I have read and studied the plugin myself, after further testing i found out if
i delay the second inappbrowser open command for at least 1 second it is
working as intended to display the second inappbrowser window in foreground and
after some time the "garbage collection" cleans up the first inappbrowser
instance.
If this is not a bug but working as intended, i don't see why a timeout of 1
second between close and open should change the complete behaviour of this part
of code.
> inappbrowser close function not working as intended, leaving instance of
> inappbrowser running
> ---------------------------------------------------------------------------------------------
>
> Key: CB-9845
> URL: https://issues.apache.org/jira/browse/CB-9845
> Project: Apache Cordova
> Issue Type: Bug
> Components: Plugin InAppBrowser
> Affects Versions: Master
> Environment: Mac OSX/Win10/Ubuntu14.04
> Reporter: Sebastian Betzinger
> Priority: Critical
> Labels: 1.0.1, Android, inappbrowser, ios
>
> recent cordova tools 5.3.3, recent inappbrowser 1.0.1
> Code to reproduce:
> var ref;
> function xy() {
> ref = cordova.InAppBrowser.open(...);
> }
> function ab() {
> ref.close();
> xy();
> }
> xy();
> ab();
> First InAppBrowser instance stays opened with url "about:blank" in foreground
> and a second instance of InAppBrowser is launched in background with actual
> content. Using show() function on second instance does not bring second
> inappbrowser to foreground, so every newly launched instance is stuck in
> background.
> Should be: instance of InAppBrowser should be purged and closed instead of
> being held with "about:blank"
> Also using the Toolbar/Locationbar to close the inappbrowser leaves the
> instance on device. This is a matter in lack of performance regarding long
> time running of the apps.
> https://github.com/apache/cordova-plugin-inappbrowser/blob/master/src/android/InAppBrowser.java
> line 377 dismiss seems not to work!
> workaround: direclty after a instance of IAB is closed you are not able to
> open another instance of IAB except you add a setTimeout of at least 1000ms -
> this brings at least the second instance into foreground.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]