Cordova InAppBrowser opens double window on Android -



Cordova InAppBrowser opens double window on Android -

i have developed app in cordova 3.6 latest version of inappbrowser. run on android device (4.1.2 , others) when user taps link open inappbrowser, double window seems open up. sec of these windows doesn't close.

to check if had done in app, created default cordova hello world app , added standard window.open code link this

<a href="#" onclick="window.open('http://www.google.com','_blank')">open window</a>

and basic testing on device revealed same thing happening - fast or double tapping made double window open up, 1 of uncloseable. either <300ms double tap, or double taps browser slow launch.

this doesn't appear happen on ios.

any help gratefully appreciated.

update

part of problem on main app functions declared in wrong place (onpagecreate) beingness fired multiple times. set here in case similar...

however on hello world app problem still happens. tried , without fastclick, fastclick didn't work (possible conflict jquery mobile, arrghh).

your problem caused using 'onclick' event launch childbrowser.

onclick has built in 300ms timeout, can create app appear laggy , causes of issues above.

use mouseup/mousedown instead, , within handler, disable listener

<a href="#" onclick="open('http://www.google.com','_blank')">open window</a> function open(url, name) { // deregister onclick listener, insuring callback resolves window.open(url,name); // register listener }

android cordova inappbrowser

Comments

Popular posts from this blog

Delphi change the assembly code of a running process -

json - Hibernate and Jackson (java.lang.IllegalStateException: Cannot call sendError() after the response has been committed) -

C++ 11 "class" keyword -