Skip to content

Comments

Support isClearFocusOnMouseDownEnabled API#2644

Merged
ASalavei merged 2 commits intojb-mainfrom
andrei.salavei/adopt-isClearFocusOnMouseDownEnabled
Dec 17, 2025
Merged

Support isClearFocusOnMouseDownEnabled API#2644
ASalavei merged 2 commits intojb-mainfrom
andrei.salavei/adopt-isClearFocusOnMouseDownEnabled

Conversation

@ASalavei
Copy link

@ASalavei ASalavei commented Dec 16, 2025

Add the isClearFocusOnMouseDownEnabled API, which allows you to adjust the focus behaviour when clicking on an unfocused element with a mouse or trackpad.
Update instrumented tests by adding ability to simulate mouse clicks.

Fixes https://youtrack.jetbrains.com/issue/CMP-9323/Support-isClearFocusOnMouseDownEnabled-API-on-iOS

Release Notes

Features - iOS

  • Add ability to adjust isClearFocusOnMouseDownEnabled in the configure lambda when creating Compose components.

Copy link

@m-sasha m-sasha left a comment

Choose a reason for hiding this comment

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

You didn't make the setting modifiable except globally. Was that intentional?

In Android, it's a setting per AndroidComposeView.
On the desktop we decided to provide both a global setting in ComposeUiFlags and the ability to change it in ComposePanel.

I'm not actually sure this is needed, but just verifying it was done consciously.

EDIT: Ah, I see it can be configured per ComposeSceneMediator, but can't be changed after creation.

@m-sasha m-sasha self-requested a review December 16, 2025 14:31
@ASalavei ASalavei merged commit 6236b82 into jb-main Dec 17, 2025
16 checks passed
@ASalavei ASalavei deleted the andrei.salavei/adopt-isClearFocusOnMouseDownEnabled branch December 17, 2025 11:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants