can3p (can3p) wrote in changelog,
can3p
can3p
changelog

[livejournal] r19921: LJSUP-9570: LJ-cut does not work correct...

Committer: dpetrov
LJSUP-9570: LJ-cut does not work correctly
U   trunk/htdocs/js/rte.js
Modified: trunk/htdocs/js/rte.js
===================================================================
--- trunk/htdocs/js/rte.js	2011-09-01 03:29:15 UTC (rev 19920)
+++ trunk/htdocs/js/rte.js	2011-09-01 04:25:37 UTC (rev 19921)
@@ -25,6 +25,24 @@
 				isDirty = false;
 			} );
 
+		//msie doesn't show all textarea content if width of textarea is equal to 100% (css).
+		if (jQuery.browser.msie) {
+			jQuery(function() {
+				var draft = jQuery('#draft'),
+					container = jQuery('#draft-container');
+
+				var updateTextarea = function() {
+					draft.css('width','auto');
+					draft.width(container.width());
+				}
+
+				if (draft.length && container.length) {
+					jQuery(window).resize(updateTextarea);
+					updateTextarea();
+				}
+			});
+		}
+
 		window.onbeforeunload = confirmExit;
 	}
 
@@ -166,14 +184,7 @@
 				CKEditor.container.hide();
 				CKEditor.element.show();
 
-				// IE7 hack fix
-				if ($.browser.msie && ($.browser.version == '7.0' || $.browser.version == '8.0')) {
-					setTimeout(function() {
-						CKEditor.element.setValue(data);
-					}, 50);
-				} else {
-					CKEditor.element.setValue(data);
-				}
+				CKEditor.element.setValue(data);
 			}
 
 		}

Tags: can3p, js, livejournal
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments