Make WordPress Core

Ticket #29226: reset-client-window.29226.patch

File reset-client-window.29226.patch, 520 bytes (added by mackensen, 12 years ago)

Resets scroll position if necessary

  • src/wp-admin/js/editor.js

     
    114114                        DOM.addClass( wrap_id, 'html-active' );
    115115                        setUserSetting( 'editor', 'html' );
    116116                }
     117                // Reset client window if necessary.
     118                (function($) {
     119                        if ( $(document).scrollTop() > $('div#wpwrap').height()) {
     120                                window.scroll( 0, $('div#wpwrap').height() );
     121                        }
     122                })(jQuery);
    117123                return false;
    118124        },
    119125