I have a javascript function 'gotoMainPage()'
function gotoMainPage( ) {
window.location.href = "main/main.do";
}
Now, WebViewClient's shouldOverrideUrlLoading(..)
gets called if gotoMainPage( )
is executed as a result of a 'direct user interaction', such as user clicking on this div:
<div.... onclick='gotoMainPage();'/>
However, if the execution is done via setTimeout( gotoMainPage, 100 );
or via an XMLHttpRequest
callback, shouldOverrideUrlLoading(..)
is never called but the requested page is loaded into the webview.
Am I missing an obvious explanation or is this a bug?
Anyone?