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
This commit is contained in:
Andrew Nacin 2014-01-23 18:02:06 +00:00
parent 18da726943
commit f70f020c54
1 changed files with 2 additions and 2 deletions

View File

@ -159,9 +159,9 @@ jQuery(document).ready( function($) {
editor.on('focus input propertychange', function() {
var $this = $(this),
//   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');