Issue
I'm using React Native with the react-native-webview
library. My code is like this:
<SafeAreaView style={backgroundStyle}>
<WebView
useWebKit={true}
scrollEnabled={false}
hideKeyboardAccessoryView={true}
keyboardDisplayRequiresUserAction={false}
nestedScrollEnabled={!useContainer}
style={[styles.webview, style]}
{...rest}
menuItems={[{ key: 'test0001', label: 'Bold Test' }]}
onCustomMenuSelection={(event) => {
console.log('hehehe');
}}
/>
</SafeAreaView>
It's work well with iOS <= 15, but cannot run on iOS >= 16. I figured out the reason is UIMenuController has been deprecated and we should use UIEditMenuInteraction instead.
Any suggestion or document/links for me? Please help me, thank you so much.
P/s: I tried to edit the library native code but it seems Objective-C is so strange to me :(((
Solution
Resolved by myself and contributed back to the repository. https://github.com/react-native-webview/react-native-webview/pull/3272
Answered By - Duy Nguyễn Hoàng
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.