iou90 / react-native-autoheight-webview

An auto height webview for React Native
ISC License
492 stars 162 forks source link

When I added onShouldStartLoadWithRequest , the ios screen is not called. #223

Closed HoSeopLee closed 2 years ago

HoSeopLee commented 2 years ago

Bug description:

To Reproduce:

Source (static HTML or url): <AutoHeightWebView ref={innerRef} setSupportMultipleWindows={false} originWhitelist={['*']} style={{ width: '100%', opacity: 0.99, overflow: 'hidden', }} containerStyle={{ backgroundColor: '#F8F8F8', borderRadius: getWidth(12), paddingTop: getHeight(10), paddingVertical: getHeight(20), }} customStyle={ figure { padding:0; margin:0; } img { width:100%; height: auto; padding:0; margin:0; } iframe { width: 100%; height: 200px; } } source={{ html:상세 내용2\r\n<div><a href=\"http://o-stage.co.kr/\"><img alt=\"\" height=\"510\" src=\"https://dmonster1817.cafe24.com/images/uploads/et_content_ediotr_20220518123156.jpg\" width=\"437\" /></a></div>\r\n&nbsp;, }} viewportContent={'width=device-width, user-scalable=no'} scrollEnabled={false} startInLoadingState={false} animationEnabled={false} scalesPageToFit={false} allowFileAccess={true} androidHardwareAccelerationDisabled={true} automaticallyAdjustContentInsets={true} javaScriptEnabled={true} androidLayerType="hardware" domStorageEnabled={true} mixedContentMode="always" allowsFullscreenVideo={false} allowsInlineMediaPlayback={true} setSupportMultipleWindows={false} //링크 오픈 onShouldStartLoadWithRequest={request => { Linking.openURL(request.url); return false; }} /> Expected behavior: Adding onShouldStartLoadWithRequest prevents the ios screen from being called. Please help me. When a link is clicked, a navigation function is absolutely necessary. Screenshots/Videos: IMG_9B4F4BB30FB7-1

Environment: