mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 22:01:30 +00:00
fix for 29016 (again) don't pass the click through if there is a popup, just roll it up. this is what macOS native context menus do. r=sfraser.
This commit is contained in:
parent
b22afec3a7
commit
ebfba4f468
@ -397,15 +397,20 @@ void nsMacMessagePump::DoMouseDown(EventRecord &anEvent)
|
||||
|
||||
case inMenuBar:
|
||||
{
|
||||
long menuResult = ::MenuSelect(anEvent.where);
|
||||
if (HiWord(menuResult) != 0)
|
||||
{
|
||||
menuResult = ConvertOSMenuResultToPPMenuResult(menuResult);
|
||||
DoMenu(anEvent, menuResult);
|
||||
}
|
||||
// If a xul popup is displayed, roll it up and don't allow the click
|
||||
// through to the menu code. This is how MacOS context menus work, so
|
||||
// I think this is a valid solution.
|
||||
if ( gRollupListener && gRollupWidget )
|
||||
gRollupListener->Rollup();
|
||||
break;
|
||||
else {
|
||||
long menuResult = ::MenuSelect(anEvent.where);
|
||||
if (HiWord(menuResult) != 0)
|
||||
{
|
||||
menuResult = ConvertOSMenuResultToPPMenuResult(menuResult);
|
||||
DoMenu(anEvent, menuResult);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
case inContent:
|
||||
|
Loading…
Reference in New Issue
Block a user