summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorAndrew Nacin <nacin@git.wordpress.org>2014-01-23 18:02:06 +0000
committerAndrew Nacin <nacin@git.wordpress.org>2014-01-23 18:02:06 +0000
commitf70f020c54c7edf09cd163bdb58b8e72e14c6b1c (patch)
treec9ef8ce93e4dc6e880e20863d000983b9045640b
parent18da7269436c57d53cda1d23bd914a8201d151c0 (diff)
downloadwordpress-f70f020c54c7edf09cd163bdb58b8e72e14c6b1c.tar.gz
wordpress-f70f020c54c7edf09cd163bdb58b8e72e14c6b1c.zip
Properly detect line height of Quick Draft textarea.
props batmoo. fixes #26915 for trunk. git-svn-id: https://develop.svn.wordpress.org/trunk@27021 602fd350-edb4-49c9-b593-d223f7449a82
-rw-r--r--src/wp-admin/js/dashboard.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/wp-admin/js/dashboard.js b/src/wp-admin/js/dashboard.js
index f88be70fd9..4d4eb50d0c 100644
--- a/src/wp-admin/js/dashboard.js
+++ b/src/wp-admin/js/dashboard.js
@@ -159,9 +159,9 @@ jQuery(document).ready( function($) {
editor.on('focus input propertychange', function() {
var $this = $(this),
// &nbsp; is to ensure that the height of a final trailing newline is included.
- textareaContent = $this.val().replace(/\n/g, '<br>') + '&nbsp;',
+ textareaContent = $this.val() + '&nbsp;',
// 2px is for border-top & border-bottom
- cloneHeight = clone.css('width', $this.css('width')).html(textareaContent).outerHeight() + 2;
+ cloneHeight = clone.css('width', $this.css('width')).text(textareaContent).outerHeight() + 2;
// Default to having scrollbars
editor.css('overflow-y', 'auto');