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.
git-svn-id: svn://10.0.0.236/trunk@63227 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
272b6554a1
commit
3163a44acc
@ -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…
x
Reference in New Issue
Block a user