Skip to content

Modal has different insets between Android vs iOS #89

@arok

Description

@arok

I have this code of base modal sheet in my app

ModalBottomSheet(
        state = state,
        onDismiss = onDismissed,
    ) {
        Scrim()
        Sheet(
            modifier = Modifier
                .statusBarsPadding()
                .padding(sheetPadding)
                .shadow(4.dp, RoundedCornerShape(topStart = 28.dp, topEnd = 28.dp))
                .clip(RoundedCornerShape(topStart = 28.dp, topEnd = 28.dp))
                .background(Color.White)
                .widthIn(max = 640.dp)
                .fillMaxWidth()
                .imePadding()
        ) {
              content()
        }
    }

On Android it looks like this (status bar is not covered by the sheet)
Image

On iOS like this (status bar is partially covered by the sheet)
Image

This happens only if software keyboard is visible.
Found working solution so far is to set DialogProperties.useSoftwareKeyboardInset to true

So it would be nice to be able to control DialogProperties of Modals.

Metadata

Metadata

Assignees

No one assigned

    Labels

    blocked-by-cmpThis issue is cannot be resolved until a specific bug or issue on Compose Multiplatform is resolved.platform: iOS

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions