WordPress.org

Make WordPress Core

Ticket #28000: 28000.diff

File 28000.diff, 497 bytes (added by jupiterwise, 5 years ago)

Wrap the toolbarHeight measurement in a parseInt()

  • wp-admin/js/post.js

    diff --git wp-admin/js/post.js wp-admin/js/post.js
    index 4eac7d1..21f28e7 100644
    jQuery(document).ready( function($) { 
    10251025
    10261026                        if ( mce ) {
    10271027                                editor.focus();
    1028                                 toolbarHeight = $( '#wp-content-editor-container .mce-toolbar-grp' ).height();
     1028                                toolbarHeight = parseInt( $( '#wp-content-editor-container .mce-toolbar-grp' ).height(), 10 );
    10291029
    10301030                                if ( toolbarHeight < 10 || toolbarHeight > 200 ) {
    10311031                                        toolbarHeight = 30;