Make WordPress Core

Changeset 27021 for trunk


Ignore:
Timestamp:
01/23/2014 06:02:06 PM (12 years ago)
Author:
nacin
Message:

Properly detect line height of Quick Draft textarea.

props batmoo.
fixes #26915 for trunk.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/js/dashboard.js

    r26813 r27021  
    160160            var $this = $(this),
    161161                //   is to ensure that the height of a final trailing newline is included.
    162                 textareaContent = $this.val().replace(/\n/g, '<br>') + '&nbsp;',
     162                textareaContent = $this.val() + '&nbsp;',
    163163                // 2px is for border-top & border-bottom
    164                 cloneHeight = clone.css('width', $this.css('width')).html(textareaContent).outerHeight() + 2;
     164                cloneHeight = clone.css('width', $this.css('width')).text(textareaContent).outerHeight() + 2;
    165165
    166166            // Default to having scrollbars
Note: See TracChangeset for help on using the changeset viewer.