You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-11-23 22:36:32 +02:00
Mobile: Plugins: Fix plugin panel buttons are offscreen on recent versions of Android (#13080)
This commit is contained in:
@@ -27,11 +27,23 @@ export interface ModalElementProps extends ModalProps {
|
||||
const useStyles = (hasScrollView: boolean, backgroundColor: string|undefined) => {
|
||||
const safeAreaPadding = useSafeAreaPadding();
|
||||
return useMemo(() => {
|
||||
// On Android, the top-level container seems to need to be absolutely positioned
|
||||
// to prevent it from being larger than the screen size:
|
||||
const absoluteFill = {
|
||||
position: 'absolute',
|
||||
top: 0,
|
||||
left: 0,
|
||||
right: 0,
|
||||
bottom: 0,
|
||||
} satisfies ViewStyle;
|
||||
|
||||
return StyleSheet.create({
|
||||
modalBackground: {
|
||||
...safeAreaPadding,
|
||||
flexGrow: 1,
|
||||
flexShrink: 1,
|
||||
...(hasScrollView ? {
|
||||
flexGrow: 1,
|
||||
flexShrink: 1,
|
||||
} : absoluteFill),
|
||||
|
||||
// When hasScrollView, the modal background is wrapped in a ScrollView. In this case, it's
|
||||
// possible to scroll content outside the background into view. To prevent the edge of the
|
||||
@@ -40,6 +52,7 @@ const useStyles = (hasScrollView: boolean, backgroundColor: string|undefined) =>
|
||||
backgroundColor: hasScrollView ? null : backgroundColor,
|
||||
},
|
||||
keyboardAvoidingView: {
|
||||
...absoluteFill,
|
||||
flex: 1,
|
||||
},
|
||||
modalScrollView: {
|
||||
|
||||
Reference in New Issue
Block a user