cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Othon Crelier (JIRA)" <>
Subject [jira] [Commented] (CB-12407) InAppBrowser object reference AND events lost
Date Sat, 25 Mar 2017 16:32:42 GMT


Othon Crelier commented on CB-12407:

@jcesarmobile Sorry about the delay, I was not receiving notifications. 

The app does not get restarted. It's just the previous inappbrowser instance that becomes
silly and useless, as it loses the event listeners I had previously assigned to them. 

My current workaround is:
1) close my _blank browser
2) open the _system browser
3) open a new _blank browser at the same URL and reassign event listeners. Which is clearly
very inefficient. 

> InAppBrowser object reference AND events lost
> ---------------------------------------------
>                 Key: CB-12407
>                 URL:
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Plugin InAppBrowser
>    Affects Versions: 6.4.0
>         Environment: android (never tried other plaforms)
>            Reporter: Othon Crelier
> If you have an instance of InAppBrowser, say, with target=_blank, and then you create
a new instance with target=_system, your original InAppBrowser reference gets lost, and the
events assigned to it stop working.
> {code:javascript}
>   let blankBrowser = new InAppBrowser('', '_blank', 'location=no,zoom=no,hidden=no');
>   blankBrowser.on('loadstart').subscribe(
>     event => {
>       //some behavior
>     }
>   );
>   let systemBrowser = new InAppBrowser('', '_system', 'location=no,zoom=no,hidden=no');
>   //bang! the events assigned to blankBrowser go away, and I cannot do anything with
the reference
> {code}

This message was sent by Atlassian JIRA

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

View raw message