Ticket #36482: 36482.5.patch
File 36482.5.patch, 1.3 KB (added by , 9 years ago) |
---|
-
src/wp-admin/js/editor-expand.js
76 76 } 77 77 78 78 function textEditorResize() { 79 var reduce,scrollHeight;79 var scrollHeight; 80 80 81 81 if ( mceEditor && ! mceEditor.isHidden() ) { 82 82 return; … … 86 86 return; 87 87 } 88 88 89 reduce = textEditorLength > ( textEditorLength = textEditor.value.length ); 90 scrollHeight = textEditor.scrollHeight; 91 92 if ( reduce ) { 89 if ( textEditorLength > ( textEditorLength = textEditor.value.length ) ) { 93 90 textEditor.style.height = 'auto'; 94 textEditor.style.height = scrollHeight + 'px'; 95 adjust(); 96 } else if ( parseInt( textEditor.style.height, 10 ) < scrollHeight ) { 97 textEditor.style.height = scrollHeight + 'px'; 91 scrollHeight = textEditor.scrollHeight; 92 93 if ( scrollHeight < autoresizeMinHeight ) { 94 textEditor.style.height = autoresizeMinHeight + 'px'; 95 } else { 96 textEditor.style.height = scrollHeight + 'px'; 97 } 98 98 99 adjust(); 100 } else { 101 scrollHeight = textEditor.scrollHeight; 102 103 if ( parseInt( textEditor.style.height, 10 ) < scrollHeight ) { 104 textEditor.style.height = scrollHeight + 'px'; 105 adjust(); 106 } 99 107 } 100 108 } 101 109