1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-01-06 16:04:12 +01:00

Closes issue #680.

This commit is contained in:
Kris Maglione
2011-10-05 17:12:43 -04:00
parent 942aa9214a
commit f0028647c3
2 changed files with 43 additions and 37 deletions

View File

@@ -403,16 +403,19 @@ var DOM = Class("DOM", {
this[0] instanceof Ci.nsIDOMNSEditableElement;
if (this[0].editor instanceof Ci.nsIEditor)
return this[0].editor;
var editor = this[0].editor;
try {
return this[0].QueryInterface(Ci.nsIInterfaceRequestor).getInterface(Ci.nsIWebNavigation)
.QueryInterface(Ci.nsIInterfaceRequestor).getInterface(Ci.nsIEditingSession)
.getEditorForWindow(this[0]);
if (!editor)
editor = this[0].QueryInterface(Ci.nsIInterfaceRequestor).getInterface(Ci.nsIWebNavigation)
.QueryInterface(Ci.nsIInterfaceRequestor).getInterface(Ci.nsIEditingSession)
.getEditorForWindow(this[0]);
}
catch (e) {}
return null;
editor instanceof Ci.nsIPlaintextEditor;
editor instanceof Ci.nsIHTMLEditor;
return editor;
},
get isEditable() !!this.editor,