зеркало из https://github.com/mozilla/pjs.git
Release XP menu rollup listener before menu is executed. This restores normal event handling earlier. Fixes bug 15596. r:hyatt
This commit is contained in:
Родитель
a89e1c3721
Коммит
dbe1a08a25
|
@ -452,6 +452,12 @@ nsMenuBarFrame::Enter()
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
nsMenuBarFrame::HideChain()
|
nsMenuBarFrame::HideChain()
|
||||||
{
|
{
|
||||||
|
// Stop capturing rollups
|
||||||
|
// (must do this during Hide, which happens before the menu item is executed,
|
||||||
|
// since this reinstates normal event handling.)
|
||||||
|
if (nsMenuFrame::mDismissalListener)
|
||||||
|
nsMenuFrame::mDismissalListener->Unregister();
|
||||||
|
|
||||||
if (mCurrentMenu) {
|
if (mCurrentMenu) {
|
||||||
mCurrentMenu->ActivateMenu(PR_FALSE);
|
mCurrentMenu->ActivateMenu(PR_FALSE);
|
||||||
mCurrentMenu->SelectMenu(PR_FALSE);
|
mCurrentMenu->SelectMenu(PR_FALSE);
|
||||||
|
|
|
@ -109,8 +109,10 @@ nsMenuDismissalListener::Rollup()
|
||||||
{
|
{
|
||||||
if (mEnabled) {
|
if (mEnabled) {
|
||||||
if (mMenuParent) {
|
if (mMenuParent) {
|
||||||
|
AddRef();
|
||||||
mMenuParent->HideChain();
|
mMenuParent->HideChain();
|
||||||
mMenuParent->DismissChain();
|
mMenuParent->DismissChain();
|
||||||
|
Release();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
Unregister();
|
Unregister();
|
||||||
|
|
|
@ -616,6 +616,12 @@ nsMenuPopupFrame::GetParentPopup(nsIMenuParent** aMenuParent)
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
nsMenuPopupFrame::HideChain()
|
nsMenuPopupFrame::HideChain()
|
||||||
{
|
{
|
||||||
|
// Stop capturing rollups
|
||||||
|
// (must do this during Hide, which happens before the menu item is executed,
|
||||||
|
// since this reinstates normal event handling.)
|
||||||
|
if (nsMenuFrame::mDismissalListener)
|
||||||
|
nsMenuFrame::mDismissalListener->Unregister();
|
||||||
|
|
||||||
nsIFrame* frame;
|
nsIFrame* frame;
|
||||||
GetParent(&frame);
|
GetParent(&frame);
|
||||||
if (frame) {
|
if (frame) {
|
||||||
|
|
Загрузка…
Ссылка в новой задаче