Skip to content

Fix ModalBottomSheetDialog content insets#2849

Merged
svastven merged 4 commits intojb-mainfrom
svastven/bugfix/modal-bottom-sheet-insets
Mar 31, 2026
Merged

Fix ModalBottomSheetDialog content insets#2849
svastven merged 4 commits intojb-mainfrom
svastven/bugfix/modal-bottom-sheet-insets

Conversation

@svastven
Copy link
Copy Markdown

@svastven svastven commented Mar 11, 2026

Fix ModalBottomSheetDialog content insets by not excluding IME insets from inner content

Fixes https://youtrack.jetbrains.com/issue/CMP-9846

Testing

Add ModalBottomSheetTest test suite

I have also added an example screen as part of this PR to demonstrate ModalBottomSheet with IME.

This should be tested by QA

Release Notes

Fixes - iOS

  • Fix ModalBottomSheetDialog content inset calculation

dismissOnClickOutside = properties.shouldDismissOnClickOutside,
usePlatformDefaultWidth = false,
usePlatformInsets = false,
usePlatformInsets = true,
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It doesn't look correct to me. The dialog itself should remain "full screen". Insets should work correctly with usePlatformInsets = false.

It seems that the fix should be on lower levels without touching material3 module

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confirmed that it breaks basic usage even in mpp

jb-main #2849
Image Image
Image Image

dismissOnClickOutside = properties.shouldDismissOnClickOutside,
usePlatformDefaultWidth = false,
usePlatformInsets = false,
usePlatformInsets = true,
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confirmed that it breaks basic usage even in mpp

jb-main #2849
Image Image
Image Image

@svastven
Copy link
Copy Markdown
Author

@MatkovIvan thanks for the example. That does not look correct. We could have some test when this behavior is not met. I will add it and investigate deeper.

@svastven svastven requested review from ASalavei and removed request for ASalavei March 11, 2026 10:23
@svastven svastven marked this pull request as draft March 11, 2026 10:24
@svastven svastven force-pushed the svastven/bugfix/modal-bottom-sheet-insets branch from 06b9a94 to af6b6a9 Compare March 17, 2026 22:25
@svastven svastven marked this pull request as ready for review March 30, 2026 13:07
@svastven svastven requested a review from ASalavei March 30, 2026 13:07
@svastven svastven force-pushed the svastven/bugfix/modal-bottom-sheet-insets branch from af6b6a9 to 49d0020 Compare March 30, 2026 13:40
@svastven svastven requested a review from mazunin-v-jb March 31, 2026 11:49
@svastven svastven force-pushed the svastven/bugfix/modal-bottom-sheet-insets branch from 49d0020 to ff40d32 Compare March 31, 2026 13:11
@svastven
Copy link
Copy Markdown
Author

Checked various usages and current behavior should be consistent with jb-main

Simulator Screenshot - iPhone 17 Pro - 2026-03-31 at 15 12 43 Simulator Screenshot - iPhone 17 Pro - 2026-03-31 at 15 12 40

I have also added an example screen as part of this PR to demonstrate ModalBottomSheet with IME.

Simulator Screenshot - iPhone 17 Pro - 2026-03-31 at 15 13 38 Simulator Screenshot - iPhone 17 Pro - 2026-03-31 at 15 13 34

@svastven svastven force-pushed the svastven/bugfix/modal-bottom-sheet-insets branch from f42a237 to b409874 Compare March 31, 2026 14:12
@svastven svastven merged commit 63c0ba9 into jb-main Mar 31, 2026
16 checks passed
@svastven svastven deleted the svastven/bugfix/modal-bottom-sheet-insets branch March 31, 2026 14:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants