[
https://issues.apache.org/jira/browse/CB-10456?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15121111#comment-15121111
]
ASF GitHub Bot commented on CB-10456:
-------------------------------------
GitHub user sgrebnov opened a pull request:
https://github.com/apache/cordova-plugin-inappbrowser/pull/143
CB-10456 InAppBrowser is not closed if I close it programmatically on
Android
https://issues.apache.org/jira/browse/CB-10456
This happens due to race condition: open/initialization logic is queued
into ui thread, but dialog close method test for null is not, so if I do open
and then close then close method test is executed before open method is
completed.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/MSOpenTech/cordova-plugin-inappbrowser
CB-10456
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/cordova-plugin-inappbrowser/pull/143.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #143
----
commit 4a2878aa5ef91f250823360f50ba9c963b52f601
Author: sgrebnov <[email protected]>
Date: 2016-01-28T09:35:53Z
CB-10456 InAppBrowser is not closed if I close it programmatically on
Android
----
> InAppBrowser is not closed if I close it programmatically on Android
> --------------------------------------------------------------------
>
> Key: CB-10456
> URL: https://issues.apache.org/jira/browse/CB-10456
> Project: Apache Cordova
> Issue Type: Bug
> Components: Plugin InAppBrowser
> Reporter: Sergey Grebnov
> Assignee: Sergey Grebnov
> Labels: Andriod, triaged
>
> I use the following unit test. I see that close method is called but browser
> still on top and does not respond to close and back button.
> PS. If I do location.reload() or execute the same code from Chrome remote
> inspector then everything works as expected.
> {code}
> it("inappbrowser.spec.3 should retun InAppBrowser instance with
> required methods", function () {
> iabInstance = cordova.InAppBrowser.open(url, '_blank');
> expect(iabInstance).toBeDefined();
>
> expect(iabInstance.addEventListener).toEqual(jasmine.any(Function));
>
> expect(iabInstance.removeEventListener).toEqual(jasmine.any(Function));
> expect(iabInstance.close).toEqual(jasmine.any(Function));
> expect(iabInstance.show).toEqual(jasmine.any(Function));
> expect(iabInstance.executeScript).toEqual(jasmine.any(Function));
> expect(iabInstance.insertCSS).toEqual(jasmine.any(Function));
> iabInstance.close();
> iabInstance = null;
> });
> {code}
> May be related to CB-6702
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]