diff --git a/src/kits/interface/Window.cpp b/src/kits/interface/Window.cpp index 840bbe7c50..4d3a05def7 100644 --- a/src/kits/interface/Window.cpp +++ b/src/kits/interface/Window.cpp @@ -1008,9 +1008,11 @@ FrameMoved(origin); { BView *view = dynamic_cast(target); - // Close an eventually opened menu, unless the target is the menu itself + // Close an eventually opened menu, if this click targets the + // preferred handler, and unless the target is the menu itself BMenu *menu = dynamic_cast(fFocus); - if (menu != NULL && menu != view && menu->State() != MENU_STATE_CLOSED) { + if (menu != NULL && menu != view && PreferredHandler() == target + && menu->State() != MENU_STATE_CLOSED) { menu->QuitTracking(); return; }