Skip to content

Fix ModalBottomSheetDialog content insets#2849

Merged
Vendula Švastalová (svastven) merged 4 commits into
jb-mainfrom
svastven/bugfix/modal-bottom-sheet-insets
Mar 31, 2026
Merged

Fix ModalBottomSheetDialog content insets#2849
Vendula Švastalová (svastven) merged 4 commits into
jb-mainfrom
svastven/bugfix/modal-bottom-sheet-insets

Conversation

@svastven

@svastven Vendula Švastalová (svastven) commented Mar 11, 2026

Copy link
Copy Markdown

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

Ivan Matkov (@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 Vendula Švastalová (svastven) force-pushed the svastven/bugfix/modal-bottom-sheet-insets branch from 49d0020 to ff40d32 Compare March 31, 2026 13:11
@svastven

Vendula Švastalová (svastven) commented Mar 31, 2026

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 Vendula Švastalová (svastven) force-pushed the svastven/bugfix/modal-bottom-sheet-insets branch from f42a237 to b409874 Compare March 31, 2026 14:12
@svastven Vendula Švastalová (svastven) merged commit 63c0ba9 into jb-main Mar 31, 2026
16 checks passed
@svastven Vendula Švastalová (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