Fixing bug 106421. Now that we support null strings in the DOM node.localName can be null so we must check for that before calling methods on localName. r=jaggernaut@netscape.com, peterv@netscape.com, sr=me (trivial changes).

This commit is contained in:
jst%netscape.com 2001-10-24 08:57:17 +00:00
parent 415f0ee292
commit 26da4e9456
2 changed files with 16 additions and 3 deletions

View File

@ -113,7 +113,14 @@
{
var target = event.target;
var linkNode;
switch (target.localName.toLowerCase()) {
var local_name = target.localName;
if (local_name) {
local_name.toLowerCase();
}
switch (local_name) {
case "a":
linkNode = target;
break;

View File

@ -87,8 +87,14 @@ var contentAreaDNDObserver = {
{
if (aEvent.altKey && findParentNode(draggedNode, 'a'))
return false;
switch (draggedNode.localName.toUpperCase())
var local_name = draggedNode.localName;
if (local_name) {
local_name.toUpperCase();
}
switch (local_name)
{
case 'AREA':
case 'IMG':