зеркало из https://github.com/mozilla/gecko-dev.git
Bug 116523, Search selected text context menu missing in XHTML as XML frameset docs, strict warning on right click. r=rossi@telnet.at, sr=jag, a=asa
This commit is contained in:
Родитель
189585e2e1
Коммит
21d698a0a8
|
@ -660,15 +660,8 @@ nsContextMenu.prototype = {
|
|||
},
|
||||
|
||||
searchSelected : function() {
|
||||
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();
|
||||
|
||||
var focusedWindow = document.commandDispatcher.focusedWindow;
|
||||
var searchStr = focusedWindow.getSelection();
|
||||
searchStr = searchStr.toString();
|
||||
searchStr = searchStr.replace( /^\s+/, "" );
|
||||
searchStr = searchStr.replace(/(\n|\r|\t)+/g, " ");
|
||||
|
|
Загрузка…
Ссылка в новой задаче