Hi, Thanks, and I agree it makes no sense; but it was just some behaviour I noticed (oddly enough, the same problem didn't occur with a Button which was draggable but I didn't investigate further).
Anyway, I made the MenuBar draggable *initially* so the empty space to the right of it was draggable. A better solution is to just to use a HBox instead with a non-draggable MenBar and draggable spacer Region. The downside there is the previously-available resize cursor gets lost over the MenuBar part though (i.e., what we're discussing in another thread). Kind Regards, Cormac On Fri, 2 Jan 2026 at 13:05, Michael Strauß <[email protected]> wrote: > > I've noticed this behaviour as follows with a HeaderBar stage and > MenuBar. > > > > If you make the JFX window lose focus, but still keep it visible, note > the Menu items are responding to mouse hovers. But the first click is > always ignored (i.e., no menu shown). This can be more frustrating than it > may sound, when dealing with a lot of popups and secondary window hopping, > etc. I assume this is not limited to MenuBar either. > > > > Example and code below. I will browse to Notepad to lose focus. The red > circle you see is a click, see how it requires two clicks for the menu to > appear when coming back from Notepad. Note this is not the behaviour for > "Normal Menu", a menu not inside HeaderBar. > > > You've set an interactive element (the MenuBar) to be draggable, > that's the source of problem. I don't think that it's worth supporting > the specific scenario of click activation, as you'll soon run into > even more problems (for example, you can drag away the window under an > open menu. > > Interactive draggable elements is simply not a supported > configuration. Maybe I should explicitly point this out in the > documentation. >
