File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed
packages/iframe-plugin/src Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change 66 LinkPressTarget ,
77 useWebshell
88} from '@formidable-webview/webshell' ;
9- import { StyleProp , ViewStyle } from 'react-native' ;
9+ import { StyleProp , View , ViewStyle } from 'react-native' ;
1010import { RenderersProps } from 'react-native-render-html' ;
1111import { linkPressTargetToOnDOMLinkPressArgs } from '@native-html/plugins-core' ;
1212
@@ -148,10 +148,15 @@ export default function HTMLIframe({
148148 props : {
149149 ...userWebViewProps ,
150150 onDOMLinkPress,
151- style,
152151 source,
153152 testID : 'iframe'
154153 }
155154 } ) ;
156- return React . createElement ( WebView , webViewProps ) ;
155+ // We need to wrap the WebView in a View to circumvent a bug in
156+ // react-native-webview, see https://git.io/JKY1r
157+ return (
158+ < View style = { style } >
159+ < WebView { ...webViewProps } />
160+ </ View >
161+ ) ;
157162}
You can’t perform that action at this time.
0 commit comments