[Yulup-commits] rev 22884 - public/yulup/src/trunk/yulup/src/chrome/content/editor

andi at wyona.com andi at wyona.com
Thu Feb 22 19:04:44 CET 2007


Author: andi
Date: 2007-02-22 19:04:42 +0100 (Thu, 22 Feb 2007)
New Revision: 22884

Modified:
   public/yulup/src/trunk/yulup/src/chrome/content/editor/view.js
   public/yulup/src/trunk/yulup/src/chrome/content/editor/wysiwygmodeview.js
Log:
Call leaveView() before synchronising the model.
Debug output added.


Modified: public/yulup/src/trunk/yulup/src/chrome/content/editor/view.js
===================================================================
--- public/yulup/src/trunk/yulup/src/chrome/content/editor/view.js	2007-02-22 17:42:13 UTC (rev 22883)
+++ public/yulup/src/trunk/yulup/src/chrome/content/editor/view.js	2007-02-22 18:04:42 UTC (rev 22884)
@@ -103,6 +103,8 @@
                  * we are just booting up the editor, no other view has yet been shown,
                  * and this.controller.activeView is null. */
                 if (this.controller.activeView) {
+                    this.controller.activeView.leaveView();
+
                     /* DEBUG */ dumpTree(this.controller.activeView.editor);
 
                     /* Check if the previous view was modified. If this is the case,
@@ -112,8 +114,6 @@
                     /* We indeed switched tabs, therefore we have
                      * to synchronise the other view first. */
                     this.controller.activeView.syncToModel();
-
-                    this.controller.activeView.leaveView();
                 }
 
                 // set currently selected view

Modified: public/yulup/src/trunk/yulup/src/chrome/content/editor/wysiwygmodeview.js
===================================================================
--- public/yulup/src/trunk/yulup/src/chrome/content/editor/wysiwygmodeview.js	2007-02-22 17:42:13 UTC (rev 22883)
+++ public/yulup/src/trunk/yulup/src/chrome/content/editor/wysiwygmodeview.js	2007-02-22 18:04:42 UTC (rev 22884)
@@ -97,6 +97,9 @@
             this.view = wysiwygEditor.getEditor(wysiwygEditor.contentWindow);
             this.view.QueryInterface(Components.interfaces.nsIEditor);
 
+            // TODO: experimental, remove after use
+            this.validator = Validation.validatorFactory(this.view.document, "-//W3C//DTD HTML 4.01//EN");
+
             // hook up DocumentStateListener
             this.view.addDocumentStateListener(new DocumentStateListener(this.model));
 




More information about the Phoenix-commits mailing list