You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: platform/jewel/int-ui/int-ui-standalone/src/main/kotlin/org/jetbrains/jewel/intui/standalone/popup/JDialogRenderer.kt
+35-1Lines changed: 35 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -296,19 +296,53 @@ private fun JPopupImpl(
296
296
// - The current properties allow for the popup to be dismissed on click outside;
297
297
// - The event must be a "WINDOW_LOST_FOCUS" event;
298
298
// - The window receiving the focus should not be a child of this dialog;
299
+
// - The window receiving the focus must not be the parent window: when the user clicks back in the parent
300
+
// window, WINDOW_LOST_FOCUS fires during MOUSE_PRESSED (before Compose processes the event). Dismissing
301
+
// here would cause the popup to close and immediately reopen when a toggle button (e.g., chevron) is
302
+
// clicked. Instead, we handle this case on MOUSE_RELEASED via invokeLater (see below), which ensures
303
+
// Compose has already processed the click before the dismiss runs.
Copy file name to clipboardExpand all lines: platform/jewel/samples/showcase/src/main/kotlin/org/jetbrains/jewel/samples/showcase/components/Buttons.kt
0 commit comments