mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-04 13:07:52 +00:00
Don't select cell when context menu is launched, b=93322, r=brade, sr=sfraser
This commit is contained in:
parent
a1c1b9df85
commit
f17b1686fc
@ -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);
|
||||
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user