File tree 1 file changed +8
-3
lines changed
packages/iframe-plugin/src
1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change 6
6
LinkPressTarget ,
7
7
useWebshell
8
8
} from '@formidable-webview/webshell' ;
9
- import { StyleProp , ViewStyle } from 'react-native' ;
9
+ import { StyleProp , View , ViewStyle } from 'react-native' ;
10
10
import { RenderersProps } from 'react-native-render-html' ;
11
11
import { linkPressTargetToOnDOMLinkPressArgs } from '@native-html/plugins-core' ;
12
12
@@ -148,10 +148,15 @@ export default function HTMLIframe({
148
148
props : {
149
149
...userWebViewProps ,
150
150
onDOMLinkPress,
151
- style,
152
151
source,
153
152
testID : 'iframe'
154
153
}
155
154
} ) ;
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
+ ) ;
157
162
}
You can’t perform that action at this time.
0 commit comments