Skip to content

Support isClearFocusOnMouseDownEnabled API#2644

Merged
Andrei Salavei (ASalavei) merged 2 commits into
jb-mainfrom
andrei.salavei/adopt-isClearFocusOnMouseDownEnabled
Dec 17, 2025
Merged

Support isClearFocusOnMouseDownEnabled API#2644
Andrei Salavei (ASalavei) merged 2 commits into
jb-mainfrom
andrei.salavei/adopt-isClearFocusOnMouseDownEnabled

Conversation

@ASalavei

@ASalavei Andrei Salavei (ASalavei) commented Dec 16, 2025

Copy link
Copy Markdown

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.

@m-sasha Alexander Maryanovsky (m-sasha) left a comment

Copy link
Copy Markdown

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.

@ASalavei Andrei Salavei (ASalavei) merged commit 6236b82 into jb-main Dec 17, 2025
16 checks passed
@ASalavei Andrei Salavei (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