Don't select cell when context menu is launched, b=93322, r=brade, sr=sfraser

This commit is contained in:
cmanske%netscape.com 2001-08-10 03:50:58 +00:00
parent a1c1b9df85
commit f17b1686fc
2 changed files with 10 additions and 2 deletions

View File

@ -301,9 +301,13 @@ nsEditorShellMouseListener::MouseDown(nsIDOMEvent* aMouseEvent)
if (isContextClick)
{
// Set selection to node clicked on if NOT within an existing selection
// and not the entire body or table element
// and not the entire body or table-related elements
if (element && !NodeIsInSelection &&
!ElementIsType(element, NS_LITERAL_STRING("body")) &&
!ElementIsType(element, NS_LITERAL_STRING("td")) &&
!ElementIsType(element, NS_LITERAL_STRING("th")) &&
!ElementIsType(element, NS_LITERAL_STRING("caption")) &&
!ElementIsType(element, NS_LITERAL_STRING("tr")) &&
!ElementIsType(element, NS_LITERAL_STRING("table")))
{
mEditorShell->SelectElement(element);

View File

@ -301,9 +301,13 @@ nsEditorShellMouseListener::MouseDown(nsIDOMEvent* aMouseEvent)
if (isContextClick)
{
// Set selection to node clicked on if NOT within an existing selection
// and not the entire body or table element
// and not the entire body or table-related elements
if (element && !NodeIsInSelection &&
!ElementIsType(element, NS_LITERAL_STRING("body")) &&
!ElementIsType(element, NS_LITERAL_STRING("td")) &&
!ElementIsType(element, NS_LITERAL_STRING("th")) &&
!ElementIsType(element, NS_LITERAL_STRING("caption")) &&
!ElementIsType(element, NS_LITERAL_STRING("tr")) &&
!ElementIsType(element, NS_LITERAL_STRING("table")))
{
mEditorShell->SelectElement(element);