cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nikita Matrosov (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (CB-12407) InAppBrowser object reference AND events lost
Date Wed, 05 Apr 2017 13:03:41 GMT

    [ https://issues.apache.org/jira/browse/CB-12407?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15956809#comment-15956809
] 

Nikita Matrosov edited comment on CB-12407 at 4/5/17 1:03 PM:
--------------------------------------------------------------

[~othon2000], does this bug reproduce with the following code?
{code:javascript}
  let blankBrowser = new InAppBrowser('https://someurl.com', '_blank', 'location=no,zoom=no,hidden=no');
  blankBrowser.on('loadstart').subscribe(
    event => {
      //some behavior
    }
  );

  blankBrowser.on('loadstop').subscribe(
    event => {
       let systemBrowser = new InAppBrowser('https://anotherurl.com', '_system', 'location=no,zoom=no,hidden=no');
    }
  );
{code}


was (Author: nikita matrosov):
[~othon2000], does this bug reproduce with the following code:
{code:javascript}
  let blankBrowser = new InAppBrowser('https://someurl.com', '_blank', 'location=no,zoom=no,hidden=no');
  blankBrowser.on('loadstart').subscribe(
    event => {
      //some behavior
    }
  );

  blankBrowser.on('loadstop').subscribe(
    event => {
       let systemBrowser = new InAppBrowser('https://anotherurl.com', '_system', 'location=no,zoom=no,hidden=no');
    }
  );
{code}

> InAppBrowser object reference AND events lost
> ---------------------------------------------
>
>                 Key: CB-12407
>                 URL: https://issues.apache.org/jira/browse/CB-12407
>             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('https://someurl.com', '_blank', 'location=no,zoom=no,hidden=no');
>   blankBrowser.on('loadstart').subscribe(
>     event => {
>       //some behavior
>     }
>   );
>   let systemBrowser = new InAppBrowser('https://anotherurl.com', '_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
(v6.3.15#6346)

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


Mime
View raw message