React-native detect click on webview

Is there a solution for click detection anywhere based on responsiveness β€” a native WebView? Tried to paste it into TouchableOpacity, but I get errors. Is there any work around to detect a click?

+5
source share
2 answers

This will be a great opportunity if the reaction of the team can add it in the future. This is currently still an open question https://github.com/facebook/react-native/issues/586

Someone offers you an offer that you can try. But it’s better to wait until the facebook team offers a more elegant solution.

0
source

Any events occurring inside webview are isolated from other applications. This is by design of this native component, not a limitation of React Native.

What you need to do is manually derive the event that interests you from the web view into your application.

Now you can do this using react-native-webview-bridge . You set a global listener for the DOM event that interests you. After you catch him, you send him to your application through the bridge.

0
source

All Articles