зеркало из https://github.com/mozilla/pjs.git
122303 - right clicks originating on xul elts shouldn't show context menu. r=ben sr=hewitt
This commit is contained in:
Родитель
86c77e3b54
Коммит
91262f9cc4
|
@ -196,6 +196,11 @@ nsContextMenu.prototype = {
|
|||
},
|
||||
// Set various context menu attributes based on the state of the world.
|
||||
setTarget : function ( node ) {
|
||||
const xulNS = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
|
||||
if ( node.namespaceURI == xulNS ) {
|
||||
this.shouldDisplay = false;
|
||||
return;
|
||||
}
|
||||
// Initialize contextual info.
|
||||
this.onImage = false;
|
||||
this.onMetaDataItem = false;
|
||||
|
@ -322,12 +327,6 @@ nsContextMenu.prototype = {
|
|||
root = root.parentNode;
|
||||
}
|
||||
}
|
||||
} else if ( this.target.parentNode &&
|
||||
'tagName' in this.target.parentNode &&
|
||||
( this.target.parentNode.tagName == "scrollbar" ||
|
||||
this.target.parentNode.tagName == "thumb" ||
|
||||
this.target.parentNode.tagName == "xul:slider") ) {
|
||||
this.shouldDisplay = false;
|
||||
} else {
|
||||
try {
|
||||
var cssAttr = this.target.style.getPropertyValue( "list-style-image" ) ||
|
||||
|
|
Загрузка…
Ссылка в новой задаче