I have a webview with following settings :

```
mView.getSettings().setLoadWithOverviewMode(true);
mView.getSettings().setUseWideViewPort(false);
mView.getSettings().setJavaScriptEnabled(true);
mView.getSettings().setAllowContentAccess(true);
mView.getSettings().setDomStorageEnabled(true);

```

After loading a webpage, when I try to execute Javascript:

```
mView.loadUrl("javascript:document.querySelector('input[type=password]').value ='" + password + "'");

```

It **opens a new tab** or window **instead of setting the value of password field**.

Output of `document.querySelector('input[type=password]')` (from console) :

`<input type="password" name="userpassword" id="userpassword" maxlength="6" style="width: 128px; height: 18px">`

I tried executing the same javascript from console. It works!

I have also configured webviewclient:

```
mView.setWebViewClient(new WebViewClient() {
            @Override
            public boolean shouldOverrideUrlLoading(WebView view, String url) {
                Log.d(TAG, " shouldOverrideUrlLoading :" + url);
                view.loadUrl(url);
                return true;
            }

            @Override
            public void onPageStarted(WebView view, String url, Bitmap favicon) {
                super.onPageStarted(view, url, favicon);
                Log.d(TAG, "onPageStarted " + url);
            }

            @Override
            public void onPageFinished(WebView view, String url) {
                super.onPageFinished(view, url);
            }

            public void onReceivedError(WebView view, int errorCode,
                                        String description, String failingUrl) {
                Log.e(TAG, "Error: " + description);
            }
        });

```