Open TreyThomas93 opened 2 months ago
Similar issue in react native app on Android only. Any updates?
The same issue. Any updates?
No updates so far. Was able to rule out being a Flutter issue though.
@TreyThomas93 this https://github.com/react-native-webview/react-native-webview/issues/2243#issuecomment-1033512816 fix the issue
unfortunately I'm still facing this problem and nestedScrollEnabled didn't solve this problem
@nicolasweisslinger
The issue can be avoided by adding injecting manually the javascript in the html content instead of using the injectedJavaScript
property
by changing
const getHtml = () => `
<html><body><div><button onclick="handleClick()">click me</button></html>
`;
const injectedJavascript = `
function handleClick() {
window.alert('clicked');
}
`;
const Component = () => {
const html = getHtml();
return <WebView source={{ html, baseUrl: 'http://localhost' }} injectedJavascript={injectedJavascript} />
};
to
const getHtml = (injectedJavascript) => `
<html><body><div><button onclick="handleClick()">click me</button><script>${injectedJavascript}</script></html>
`;
const injectedJavascript = `
function handleClick() {
window.alert('clicked');
}
`;
const html = getHtml(injectedJavascript)
const Component = () => {
const html = getHtml(injectedJavascript);
return <WebView source={{ html, baseUrl: 'http://localhost' }} />
};
I made a snack to reproduce the issue, however it seems to be fixed in the latest version of react-native-webview
, and we cannot use the expo recommended one in snacks since the metro config seems outdated.
Hello 👋, this issue has been opened for more than 2 months with no activity on it. If the issue is still here, please keep in mind that we need community support and help to fix it! Just comment something like still searching for solutions and if you found one, please open a pull request! You have 7 days until this gets closed automatically
Bug description: I am using the Jitsi Flutter SDK which uses RNCWebView for their Shared Documents screen, and when I run it on Android emulator, everything works fine. But when I run it on physical Android device, nothing on the screen is tappable except the back arrow in the appbar that closes the webview. Running flutter run -v, when I click on the Open Shared Document button and the webview opens, I get the following error:
Flutter Error Log
``` [ +37 ms] D/ConnectivityManager(22827): StackLog: [android.net.ConnectivityManager.sendRequestForNetwork(ConnectivityManager.java:4300)] [android.net.ConnectivityManager.registerDefaultNetworkCallbackForUid(ConnectivityManager.java:4864)] [android.net.ConnectivityManager.registerDefaultNetworkCallback(ConnectivityManager.java:4831)] [ZZ.e(chromium-TrichromeWebViewGoogle.aab-stable-556311633:38)] [ZZ.a(chromium-TrichromeWebViewGoogle.aab-stable-556311633:1)] [org.chromium.android_webview.AwContentsLifecycleNotifier.onFirstWebViewCreated(chromium-TrichromeWebViewGoogle.aab-stable-556311633:24)] [J.N.MFiR_zHY(Native Method)] [org.chromium.android_webview.AwContents.And when I run adb logcat for the same event I get the following:
ADB Error Log
``` 04-12 19:46:13.363 1107 1733 E EffectsConfig: InvalidTo Reproduce:
As far as reproducible code, I don't have anything readily available because one must have an entire jitsi server running with Etherpad enabled and running. But if you do, then the steps to reproduce are:
Expected behavior:
That when the webview is opened, all UI components are responsive, reactive and clickable. Able to tap the body and a keyboard appears.
Environment:
I am using Jitsi Meet Flutter SDK version 0.3.0, and it look's like they are using "react-native-webview": "13.5.1" for webview.
Thanks!