-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ComposePanel. Focus moves to child after focusing/unfocusing the main window #4919
Comments
Will be fixed in |
I guess the fix will be to focus the first focusable element instead of "Enter"? |
The fix will be to skip requesting focus if it is already in focus. It is the only way to behave when we activate/deactivate window. |
I couldn't immediately find a way to check if something is already focused. When "nothing" is focused, the root node has the focus. |
No need to apply them anymore. ``` git diff androidx/compose-ui/1.6.7 origin/jb-main -- compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/focus/FocusOwnerImpl.kt > 1.patch ``` Fixes https://youtrack.jetbrains.com/issue/COMPOSE-1212/Integration.-Check-changes-in-FocusOwnerImpl JetBrains/compose-multiplatform#4917 Make the first ComposeComponent focused initially Apply jb-main FocusOwnerImpl.kt changes No need to apply them anymore. ``` git diff androidx/compose-ui/1.6.7 origin/jb-main -- compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/focus/FocusOwnerImpl.kt > 1.patch ``` Fixes https://youtrack.jetbrains.com/issue/COMPOSE-1212/Integration.-Check-changes-in-FocusOwnerImpl Fixes JetBrains/compose-multiplatform#4919 JetBrains/compose-multiplatform#4917 JetBrains/compose-multiplatform#2944
Fixes JetBrains/compose-multiplatform#2944 Fixes JetBrains/compose-multiplatform#4919 Fixes https://youtrack.jetbrains.com/issue/COMPOSE-1212/Integration.-Check-changes-in-FocusOwnerImpl After https://android-review.googlesource.com/c/platform/frameworks/support/+/2813125, there are some changes that affected our code for focus interop with ComposePanel/SwingPanel: - the root node no longer focusable - FocusOwnerImpl now has iterop callbacks and our own modification of this file (in jb-main, integration was reset) doesn't work anymore ## Testing - added new tests - ComposeFocusTest now pass ## Release notes ### Fixes - Multiple platforms - Fix "ComposePanel. Focus moves to child after focusing/unfocusing the main window"
Fixes JetBrains/compose-multiplatform#2944 Fixes JetBrains/compose-multiplatform#4919 Fixes https://youtrack.jetbrains.com/issue/COMPOSE-1212/Integration.-Check-changes-in-FocusOwnerImpl After https://android-review.googlesource.com/c/platform/frameworks/support/+/2813125, there are some changes that affected our code for focus interop with ComposePanel/SwingPanel: - the root node no longer focusable - FocusOwnerImpl now has iterop callbacks and our own modification of this file (in jb-main, integration was reset) doesn't work anymore ## Testing - added new tests - ComposeFocusTest now pass ## Release notes ### Fixes - Multiple platforms - Fix "ComposePanel. Focus moves to child after focusing/unfocusing the main window"
Fixes JetBrains/compose-multiplatform#2944 Fixes JetBrains/compose-multiplatform#4919 Fixes https://youtrack.jetbrains.com/issue/COMPOSE-1212/Integration.-Check-changes-in-FocusOwnerImpl After https://android-review.googlesource.com/c/platform/frameworks/support/+/2813125, there are some changes that affected our code for focus interop with ComposePanel/SwingPanel: - the root node no longer focusable - FocusOwnerImpl now has iterop callbacks and our own modification of this file (in jb-main, integration was reset) doesn't work anymore ## Testing - added new tests - ComposeFocusTest now pass ## Release notes ### Fixes - Multiple platforms - Fix "ComposePanel. Focus moves to child after focusing/unfocusing the main window"
Fixes JetBrains/compose-multiplatform#2944 Fixes JetBrains/compose-multiplatform#4919 Fixes https://youtrack.jetbrains.com/issue/COMPOSE-1212/Integration.-Check-changes-in-FocusOwnerImpl After https://android-review.googlesource.com/c/platform/frameworks/support/+/2813125, there are some changes that affected our code for focus interop with ComposePanel/SwingPanel: - the root node no longer focusable - FocusOwnerImpl now has iterop callbacks and our own modification of this file (in jb-main, integration was reset) doesn't work anymore ## Testing - added new tests - ComposeFocusTest now pass ## Release notes ### Fixes - Multiple platforms - Fix "ComposePanel. Focus moves to child after focusing/unfocusing the main window"
Please check the following ticket on YouTrack for follow-ups to this issue. GitHub issues will be closed in the coming weeks. |
Compose 1.6.20-dev1663
This happens, because Swing calls
focusGained
withFocusEvent.Cause.ACTIVATION
when activating the main window, and Enter moves the focus to the childRegression after JetBrains/compose-multiplatform-core#1352
The text was updated successfully, but these errors were encountered: