www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | Submodules | README | LICENSE

commit 744b4a597bb91ca354135f9ea2e2574423f21378
parent 84f59ab451c2cfd38ab4955c609580fe1630524a
Author: Dan Stillman <dstillman@zotero.org>
Date:   Sat,  9 Oct 2010 08:06:08 +0000

Missed file from previous commit


Diffstat:
Mchrome/content/zotero/bindings/styled-textbox.xml | 17++++++++++++++---
1 file changed, 14 insertions(+), 3 deletions(-)

diff --git a/chrome/content/zotero/bindings/styled-textbox.xml b/chrome/content/zotero/bindings/styled-textbox.xml @@ -335,13 +335,24 @@ getService(Components.interfaces.nsIIOService); var uri = ios.newURI("chrome://zotero/content/tinymce/" + htmlFile + ".html", null, null); + var cr = Components.classes["@mozilla.org/chrome/chrome-registry;1"] + .getService(Components.interfaces.nsIChromeRegistry); + uri = cr.convertChromeURL(uri); + Zotero.debug("Loading " + uri.spec); // Register handler for deferred setting of content var self = this; var listener = function() { + var SJOW = self._iframe.contentWindow.wrappedJSObject; + + var editor = SJOW.tinyMCE.get("tinymce"); + if (!editor) { + // Not ready yet + return; + } + self._iframe.removeEventListener("DOMContentLoaded", listener, false); - var editor = self._iframe.contentWindow.tinyMCE.get("tinymce"); editor.onInit.add(function() { self._editor = editor; @@ -379,7 +390,7 @@ }); if (self._eventHandler) { - self._iframe.contentWindow.handleEvent = self._eventHandler; + self._iframe.contentWindow.wrappedJSObject.handleEvent = self._eventHandler; } }; this._iframe.addEventListener("DOMContentLoaded", listener, false); @@ -393,7 +404,7 @@ </implementation> <content> - <xul:iframe flex="1" anonid="rt-view" class="rt-view" + <xul:iframe flex="1" anonid="rt-view" class="rt-view" type="content" xbl:inherits="onfocus,onblur,flex,width,height,hidden" style="overflow: hidden"/> </content>