On Tue, 6 Oct 2026 21:14:27 GMT, Andy Goryachev <[email protected]> wrote:
>> Florian Kirmaier has updated the pull request incrementally with one >> additional commit since the last revision: >> >> 8388313: PR feedback1 > > modules/javafx.controls/src/main/java/javafx/scene/control/ContextMenu.java > line 255: > >> 253: if (getItems().size() == 0) return; >> 254: >> 255: >> PopupWindowHelper.ownerWindow(this).set(anchor.getScene().getWindow()); > > this runs before `PopupWindow.validateOwnerWindow()`, causing regression > when, for example, an already visible menu is shown from a node in some other > window > since it'll likely mess up other things like internal listeners and native > peers. my suggestions are in the comments bellow. > modules/javafx.controls/src/main/java/javafx/scene/control/ContextMenu.java > line 257: > >> 255: >> PopupWindowHelper.ownerWindow(this).set(anchor.getScene().getWindow()); >> 256: PopupWindowHelper.ownerNode(this).set(anchor); >> 257: PopupWindowHelper.applyStylesheetFromOwner(this, >> anchor.getScene().getWindow()); > > an anchor may have a scene without a window, likely causing an NOE. my suggestions are in the comments bellow. ------------- PR Review Comment: https://git.openjdk.org/jfx/pull/2215#discussion_r4208475412 PR Review Comment: https://git.openjdk.org/jfx/pull/2215#discussion_r4208474809
