-
Notifications
You must be signed in to change notification settings - Fork 5.7k
[JEWEL-1188] Caret not moving when the popup is visible #3352
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
base: master
Are you sure you want to change the base?
[JEWEL-1188] Caret not moving when the popup is visible #3352
Conversation
...-ui-standalone/src/main/kotlin/org/jetbrains/jewel/intui/standalone/popup/JDialogRenderer.kt
Outdated
Show resolved
Hide resolved
1fc9d84 to
4656da7
Compare
...-ui-standalone/src/main/kotlin/org/jetbrains/jewel/intui/standalone/popup/JDialogRenderer.kt
Outdated
Show resolved
Hide resolved
faogustavo
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Something I noticed while I was testing the PR is that only skipping the event consumption is enough to fix the problems. The EditableComboBox has the logic to skip the onDismissRequest() call.
Maybe we can just remove the event.consume() and leave the consume to happen in the compose layer so it can handle cursor position changes/etc
You mean to just keep the |
c2d6ab6 to
3117302
Compare
3117302 to
f7875bd
Compare
rock3r
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ez
|
Ready to merge |
Summary
Fixes an issue where clicking in an editable combo box text field while a popup is visible would dismiss the popup but fail to move the caret to the clicked position. Only happens with Custom Popup Renderer enabled.
The
AWTEventListenerwas consuming all mouse press events that triggered popup dismissal, including clicks on the owner component (editable combo box). When the event was consumed, it never reached the text field component, preventing caret repositioning.Solution
Removed the
event.consume()in theMouseEventbranch and leave the consume to happen in the compose layer, as it's done for theWindowEventlogic.Release notes
Bug fixes
Note
Fixes lost click handling when dismissing JDialog popups, ensuring clicks propagate to owner components for caret movement.
JDialogRenderer.kt, removeevent.consume()from theAWTEventListenerMouseEvent path that triggersonDismissRequestWindowEvent; compose layer now handles consumptionWritten by Cursor Bugbot for commit f7875bd. This will update automatically on new commits. Configure here.