Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

editor: use flex for fill screen

ammarahm-ed80e23b4a49bf
diff --git a/apps/mobile/src/views/Editor/EditorWrapper.js b/apps/mobile/src/views/Editor/EditorWrapper.js
index c50852f5f..0e208b316 100644
--- a/apps/mobile/src/views/Editor/EditorWrapper.js
+++ b/apps/mobile/src/views/Editor/EditorWrapper.js
@@ -5,7 +5,6 @@ import {
Platform,
SafeAreaView,
TextInput,
- useWindowDimensions,
View
} from 'react-native';
import { useSafeAreaInsets } from 'react-native-safe-area-context';
@@ -57,15 +56,13 @@ export const EditorWrapper = ({ width }) => {
>
<SafeAreaView
style={{
- width: '100%',
- height: '100%'
+ flex: 1
}}
>
<KeyboardAvoidingView
behavior={Platform.OS === 'ios' ? 'padding' : 'height'}
style={{
- width: '100%',
- height: '100%'
+ flex: 1
}}
enabled={!floating}
>
diff --git a/apps/mobile/src/views/Editor/index.js b/apps/mobile/src/views/Editor/index.js
index 614b254cb..dac2b3cb4 100755
--- a/apps/mobile/src/views/Editor/index.js
+++ b/apps/mobile/src/views/Editor/index.js
@@ -79,9 +79,8 @@ const Editor = React.memo(
<>
<View
style={{
- width: '100%',
- backgroundColor: 'transparent',
flexGrow: 1,
+ backgroundColor: 'transparent',
flex: 1
}}
>
diff --git a/apps/mobile/src/views/Editor/tiny/toolbar/index.js b/apps/mobile/src/views/Editor/tiny/toolbar/index.js
index 85904c6b1..1f994fe62 100644
--- a/apps/mobile/src/views/Editor/tiny/toolbar/index.js
+++ b/apps/mobile/src/views/Editor/tiny/toolbar/index.js
@@ -1,5 +1,5 @@
import React, { useEffect } from 'react';
-import { ScrollView, View } from 'react-native';
+import { Platform, View, ScrollView } from 'react-native';
import { ActionIcon } from '../../../../components/ActionIcon';
import { useTracked } from '../../../../provider';
import { useEditorStore } from '../../../../provider/stores';
@@ -45,8 +45,7 @@ const EditorToolbar = React.memo(
<View
style={{
width: '100%',
- minHeight: normalize(50),
- position: 'relative'
+ minHeight: normalize(50)
}}
>
{readonly ? (