Commits

Anonymous committed ca9d69c

Fix error in Firefox 3.6

Comments (0)

Files changed (1)

src/cajole/editor.cljs

 (. field (makeEditable))
 
 (def iframe (. field (getEditableIframe)))
+(def iframe-window (. iframe contentWindow))
 (def iframe-doc (. iframe contentDocument))
 (def iframe-body (. iframe-doc body))
 (def iframe-html (. iframe-body parentNode))
      "#FFF")))
 
 (defn get-selection []
-  (. iframe-doc (getSelection)))
+  (. iframe-window (getSelection)))
 
 (defn highlight-content []
   (let [t (goog.global.tokenizer (get-content))