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:
caillon%returnzero.com 2002-03-21 15:46:02 +00:00
Родитель 189585e2e1
Коммит 21d698a0a8
1 изменённых файлов: 2 добавлений и 9 удалений

Просмотреть файл

@ -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, " ");