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