1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-06-12 22:57:38 +02:00

Fixing issue with webview so that WebKit rendering can be used

This commit is contained in:
Laurent Cozic
2019-06-14 09:14:01 +01:00
parent 122bc29035
commit 0818de036e
2 changed files with 6 additions and 3 deletions

View File

@ -124,7 +124,7 @@ class NoteBodyViewer extends Component {
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body>
` + html + `
@ -166,11 +166,14 @@ class NoteBodyViewer extends Component {
// Note: useWebKit={false} is needed to go around this bug:
// https://github.com/react-native-community/react-native-webview/issues/376
// However, if we add the <meta> tag as described there, it is no longer necessary and WebKit can be used!
// https://github.com/react-native-community/react-native-webview/issues/312#issuecomment-501991406
// TODO: remove no longer used scalesPageToFit
return (
<View style={style}>
<WebView
useWebKit={false}
useWebKit={true}
scalesPageToFit={Platform.OS !== 'ios'}
style={webViewStyle}
source={source}