WordPress.org

Make WordPress Core

Changeset 20804


Ignore:
Timestamp:
05/16/12 07:02:55 (3 years ago)
Author:
azaozz
Message:

DFW: another attempt to get auto-resize working right, see #20608, see #20684

Location:
trunk/wp-includes/js/tinymce/plugins/wpfullscreen
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/js/tinymce/plugins/wpfullscreen/css/wp-fullscreen.css

    r19577 r20804  
    33*/ 
    44 
    5 html, body { 
     5html, 
     6body { 
    67    background: transparent; 
    78    width: auto !important; 
    89    max-width: none !important; 
    9     margin: 0; 
    10     padding: 0; 
     10    margin: 0 !important; 
     11    padding: 0 !important; 
     12    min-height: 0 !important; 
    1113} 
  • trunk/wp-includes/js/tinymce/plugins/wpfullscreen/editor_plugin_src.js

    r20724 r20804  
    99 
    1010        init : function(ed, url) { 
    11             var t = this, oldHeight = 0, s = {}, DOM = tinymce.DOM, resized = false; 
     11            var t = this, oldHeight = 0, s = {}, DOM = tinymce.DOM; 
    1212 
    1313            // Register commands 
     
    113113             */ 
    114114            function resize() { 
    115                 if ( resized ) 
    116                     return; 
    117  
    118115                var d = ed.getDoc(), DOM = tinymce.DOM, resizeHeight, myHeight; 
    119116 
    120117                // Get height differently depending on the browser used 
    121                 if ( tinymce.isIE || tinymce.isWebKit ) 
     118                if ( tinymce.isWebKit ) 
     119                    myHeight = d.body.offsetHeight; 
     120                else 
    122121                    myHeight = d.body.scrollHeight; 
    123                 else 
    124                     myHeight = d.body.offsetHeight; 
    125122 
    126123                // Don't make it smaller than 300px 
     
    129126                // Resize content element 
    130127                if ( oldHeight != resizeHeight ) { 
    131                     resized = true; 
    132                     setTimeout(function(){ resized = false; }, 100); 
    133128                    DOM.setStyle(DOM.get(ed.id + '_ifr'), 'height', resizeHeight + 'px'); 
    134129                    oldHeight = resizeHeight; 
     130                    ed.getWin().scrollTo(0,0); 
    135131                } 
    136132            }; 
Note: See TracChangeset for help on using the changeset viewer.