File tree Expand file tree Collapse file tree
flatlaf-core/src/main/java/com/formdev/flatlaf Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -12,6 +12,8 @@ FlatLaf Change Log
1212- Slider: Styling ` thumbSize ` or ` focusWidth ` did not update slider size/layout.
1313 (PR #1074 )
1414- ToolBar: Grip disappeared when switching between Look and Feels. (issue #1075 )
15+ - macOS: Popups (menus and combobox lists) were not always hidden when window is
16+ resized. (issue #1082 )
1517- Extras:
1618 - UI defaults inspector: Fixed NPE if color of ` FlatLineBorder ` is null. Also
1719 use ` FlatLineBorder ` line color as cell background color in "Value" column.
Original file line number Diff line number Diff line change @@ -310,8 +310,8 @@ public void initialize() {
310310 // install submenu usability helper
311311 subMenuUsabilityHelperInstalled = SubMenuUsabilityHelper .install ();
312312
313- // install Linux popup menu canceler
314- if ( SystemInfo .isLinux )
313+ // install Linux/macOS popup menu canceler
314+ if ( SystemInfo .isLinux || SystemInfo . isMacOS )
315315 linuxPopupMenuCanceler = new LinuxPopupMenuCanceler ();
316316
317317 // listen to desktop property changes to update UI if system font or scaling changes
Original file line number Diff line number Diff line change 3030import javax .swing .event .ChangeListener ;
3131
3232/**
33- * Cancels (hides) popup menus on Linux.
33+ * Cancels (hides) popup menus on Linux and macOS .
3434 * <p>
3535 * On Linux, popups are not hidden under following conditions, which results in
3636 * misplaced popups:
4141 * <li>window deactivated (e.g. activated other application)
4242 * </ul>
4343 *
44- * On Windows and macOS, popups are automatically hidden.
44+ * On macOS, popups are usually automatically hidden, but not always.
45+ * When resizing a window, then it depends where clicking to start resizing (and on the Java version).
46+ * E.g. with Java 25, clicking at bottom-right corner inside of the window does not hide the popups.
47+ * But clicking on same corner outside of the window, hides the popup.
48+ *
49+ * <p>
50+ * On Windows, popups are automatically hidden.
4551 * <p>
4652 * The implementation is similar to what's done in
4753 * {@code javax.swing.plaf.basic.BasicPopupMenuUI.MouseGrabber},
You can’t perform that action at this time.
0 commit comments