Bug 431141: input type="password" should not have "Add Keyword to this Search" context menu, r=gavin

This commit is contained in:
Kai Liu 2008-06-15 21:28:01 -04:00
parent ad9edcfa7d
commit 71fba86b9b

View File

@ -1227,8 +1227,11 @@ nsContextMenu.prototype = {
},
isTargetAKeywordField: function(aNode) {
if (!(aNode instanceof HTMLInputElement))
return false;
var form = aNode.form;
if (!form)
if (!form || aNode.type == "password")
return false;
var method = form.method.toUpperCase();