1
0
mirror of https://github.com/laurent22/joplin.git synced 2024-12-30 10:36:35 +02:00

Mobile: Fixes #7700: Fix double-scroll issue in long notes (#7701)

This commit is contained in:
Henry Heino 2023-02-08 06:24:59 -08:00 committed by GitHub
parent 322641ccd6
commit c90865c4d2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -25,9 +25,11 @@ export default function useSource(noteBody: string, noteMarkupLanguage: number,
const [resourceLoadedTime, setResourceLoadedTime] = useState(0);
const [isFirstRender, setIsFirstRender] = useState(true);
const paddingTop = '.8em';
const rendererTheme = useMemo(() => {
return {
bodyPaddingTop: '.8em', // Extra top padding on the rendered MD so it doesn't touch the border
bodyPaddingTop: paddingTop, // Extra top padding on the rendered MD so it doesn't touch the border
bodyPaddingBottom: paddingBottom, // Extra bottom padding to make it possible to scroll past the action button (so that it doesn't overlap the text)
...themeStyle(themeId),
};
@ -152,8 +154,14 @@ export default function useSource(noteBody: string, noteMarkupLanguage: number,
*/
body > #rendered-md {
width: 100vw;
height: 100vh;
overflow: auto;
height: calc(100vh - ${paddingBottom}px - ${paddingTop});
padding-bottom: ${paddingBottom}px;
padding-top: ${paddingTop};
}
:root > body {
padding: 0;
}
`;