Created
May 7, 2011 14:48
-
-
Save croaky/960553 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[34m7ccc3b4[m [32m[5 days ago][m (Mike Burns) Fix resizing bug with the editor WYSIWYG | |
diff --git a/public/javascripts/jquery.wysiwyg.js b/public/javascripts/jquery.wysiwyg.js | |
index 37ae000..961398b 100644 | |
--- a/public/javascripts/jquery.wysiwyg.js | |
+++ b/public/javascripts/jquery.wysiwyg.js | |
@@ -1327,26 +1327,6 @@ | |
.mousedown(function () { self.autoSaveFunction(); }) | |
.bind($.support.noCloneEvent ? "input.wysiwyg" : "paste.wysiwyg", function () { self.autoSaveFunction(); }); | |
} | |
- | |
- if (self.options.autoGrow) { | |
- if (self.options.initialMinHeight !== null) { | |
- self.ui.initialHeight = self.options.initialMinHeight; | |
- } else { | |
- self.ui.initialHeight = $(self.editorDoc).height(); | |
- } | |
- $(self.editorDoc.body).css("border", "1px solid white"); // cancel margin collapsing | |
- | |
- growHandler = function () { | |
- self.ui.grow(); | |
- }; | |
- | |
- $(self.editorDoc).keyup(growHandler); | |
- $(self.editorDoc).bind("editorRefresh.wysiwyg", growHandler); | |
- | |
- // fix when content height > textarea height | |
- self.ui.grow(); | |
- } | |
- | |
if (self.options.css) { | |
if (String === self.options.css.constructor) { | |
if ($.browser.msie) { | |
@@ -1424,6 +1404,25 @@ | |
$(self.editorDoc).bind("cut.wysiwyg", saveHandler); | |
} | |
} | |
+ | |
+ if (self.options.autoGrow) { | |
+ if (self.options.initialMinHeight !== null) { | |
+ self.ui.initialHeight = self.options.initialMinHeight; | |
+ } else { | |
+ self.ui.initialHeight = $(self.editorDoc).height(); | |
+ } | |
+ $(self.editorDoc.body).css("border", "1px solid white"); // cancel margin collapsing | |
+ | |
+ growHandler = function () { | |
+ self.ui.grow(); | |
+ }; | |
+ | |
+ $(self.editorDoc).keyup(growHandler); | |
+ $(self.editorDoc).bind("editorRefresh.wysiwyg", growHandler); | |
+ | |
+ // fix when content height > textarea height | |
+ self.ui.grow(); | |
+ } | |
/** | |
* XHTML5 {@link https://github.com/akzhan/jwysiwyg/issues/152} | |
@@ -1451,6 +1450,8 @@ | |
}); | |
}); | |
} | |
+ | |
+ | |
}; | |
this.innerDocument = function () { |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment