Skip to content

Filter events if there are focusable WINDOW layers#1187

Merged
MatkovIvan merged 2 commits intojb-mainfrom
ivan.matkov/fix-click-outside-window-layer
Mar 12, 2024
Merged

Filter events if there are focusable WINDOW layers#1187
MatkovIvan merged 2 commits intojb-mainfrom
ivan.matkov/fix-click-outside-window-layer

Conversation

@MatkovIvan
Copy link
Member

Proposed Changes

  • Filter events if there are focusable WINDOW layers

Testing

Test: open focusable WINDOW layer without dismissOnClickOutside, try to click on the main content

@MatkovIvan MatkovIvan requested a review from igordmn March 12, 2024 16:49
@MatkovIvan MatkovIvan merged commit 6c18c40 into jb-main Mar 12, 2024
@MatkovIvan MatkovIvan deleted the ivan.matkov/fix-click-outside-window-layer branch March 12, 2024 19:36
MatkovIvan added a commit that referenced this pull request Mar 13, 2024
## Proposed Changes

- Detect mouse input on previous layers to trigger "outside" events
instead of generating it on focus lost
- Draw scrim (with right blend mode) on all previous layers instead of
just main content

## Testing

Test: Set `compose.layers.type = WINDOW` and try to use `Popup`/`Dialog`


https://github.com/JetBrains/compose-multiplatform-core/assets/1836384/994717e5-401b-4ff0-9c31-b18d829e7da7

## Issues Fixed

Fixes
#1187 (comment)
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.

2 participants