We occasionally encounter such a BUG. Although webview is used, the pop-up window in H5 cannot be raised. So how to solve this problem? Let's take a look.
Problem:
webview cannot hoist the pop-up window in H5.
Solution:
If it is a fragment, you must use the getactivity() context, not the whole family context, otherwise the pop-up window will not work.
mWebView.setWebChromeClient(new WebChromeClient());
I believe you have mastered the methods after reading these cases. For more exciting information, please pay attention to other related articles on the php Chinese website!
Related reading:
Implementation steps of DOM programming in html5
Use H5 to make a drop-down box with special effects
Detailed graphic and text explanation of postMessage API in H5
The above is the detailed content of How to solve the problem that the pop-up window in H5 cannot pop up using webview. For more information, please follow other related articles on the PHP Chinese website!