From 6867a238298a1bf0b2c5285296b6ded04efa41a8 Mon Sep 17 00:00:00 2001 From: Timothy Nikkel Date: Sun, 27 Jun 2010 15:58:56 -0500 Subject: [PATCH] Bug 572296. Fix logic error when adjusting the position to show the context menu at for a context menu key press. r=enndeakin --- layout/base/nsPresShell.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/layout/base/nsPresShell.cpp b/layout/base/nsPresShell.cpp index dc30f1103f9..484625a85a1 100644 --- a/layout/base/nsPresShell.cpp +++ b/layout/base/nsPresShell.cpp @@ -6998,11 +6998,12 @@ PresShell::GetCurrentItemAndPositionForElement(nsIDOMElement *aCurrentEl, // don't check menulists as the selected item will be inside a popup. nsCOMPtr menulist = do_QueryInterface(aCurrentEl); if (!menulist) { - checkLineHeight = PR_FALSE; nsCOMPtr select = do_QueryInterface(aCurrentEl); - if (select) + if (select) { + checkLineHeight = PR_FALSE; select->GetSelectedItem(getter_AddRefs(item)); + } } }