diff --git a/browser/base/content/nsContextMenu.js b/browser/base/content/nsContextMenu.js index 23db1da07b58..977678017fda 100644 --- a/browser/base/content/nsContextMenu.js +++ b/browser/base/content/nsContextMenu.js @@ -421,6 +421,7 @@ nsContextMenu.prototype = { setTarget: function (aNode, aRangeParent, aRangeOffset) { const xulNS = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"; if (aNode.namespaceURI == xulNS || + aNode.nodeType == Node.DOCUMENT_NODE || this.isTargetAFormControl(aNode)) { this.shouldDisplay = false; return;