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
+20-1Lines changed: 20 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -298,19 +298,38 @@ private fun JPopupImpl(
298
298
// - The current properties allow for the popup to be dismissed on click outside;
299
299
// - The event must be a "WINDOW_LOST_FOCUS" event;
300
300
// - The window receiving the focus should not be a child of this dialog;
301
+
// - The window receiving the focus must not be the parent window: when the user clicks back in the parent
302
+
// window, WINDOW_LOST_FOCUS fires during MOUSE_PRESSED (before Compose processes the event). Dismissing
303
+
// here would cause the popup to close and immediately reopen when a toggle button (e.g., chevron) is
304
+
// clicked. Instead, we handle this case on MOUSE_RELEASED via invokeLater (see below), which ensures
305
+
// 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