зеркало из https://github.com/mozilla/gecko-dev.git
Bug 117805 - context menus don't work in XML documents
Patch by caillon@returnzero.com, r=heikki, sr=jag
This commit is contained in:
Родитель
c93dd0a2f0
Коммит
7fadd4238e
|
@ -633,7 +633,15 @@ nsContextMenu.prototype = {
|
|||
},
|
||||
|
||||
searchSelected : function() {
|
||||
var searchStr = this.target.ownerDocument.getSelection();
|
||||
var searchStr;
|
||||
|
||||
// workaround for bug 117805 to enable context menus in XML documents
|
||||
// until bug 116523 is fixed.
|
||||
if ("getSelection" in this.target.ownerDocument)
|
||||
searchStr = this.target.ownerDocument.getSelection();
|
||||
else
|
||||
searchStr = _content.getSelection();
|
||||
|
||||
searchStr = searchStr.toString();
|
||||
searchStr = searchStr.replace( /^\s+/, "" );
|
||||
searchStr = searchStr.replace(/(\n|\r|\t)+/g, " ");
|
||||
|
|
Загрузка…
Ссылка в новой задаче