mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 17:48:01 +01:00
DFW: scroll to top when opening so the user is not disoriented, see #17136
git-svn-id: http://svn.automattic.com/wordpress/trunk@17913 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
955134770f
commit
799e614e68
@ -276,8 +276,7 @@ PubSub.prototype.publish = function( topic, args ) {
|
||||
});
|
||||
|
||||
ps.subscribe( 'showing', function() { // This event occurs while the DFW overlay blocks the UI.
|
||||
var scrollY = s.mode === 'html' ? 220 + s._edCanvas.scrollTop : 140 + tinyMCE.get(s.editor_id).getBody().scrollTop;
|
||||
|
||||
|
||||
$( document.body ).addClass( 'fullscreen-active' );
|
||||
api.refresh_buttons();
|
||||
|
||||
@ -287,10 +286,8 @@ PubSub.prototype.publish = function( topic, args ) {
|
||||
api.bind_resize();
|
||||
setTimeout( api.resize_textarea, 200 );
|
||||
|
||||
if ( scrollY < 171 )
|
||||
scrollY = 0;
|
||||
|
||||
scrollTo(0, scrollY);
|
||||
// scroll to top so the user is not disoriented
|
||||
scrollTo(0, 0);
|
||||
});
|
||||
|
||||
ps.subscribe( 'shown', function() { // This event occurs after the DFW overlay is shown
|
||||
|
File diff suppressed because one or more lines are too long
@ -96,7 +96,7 @@ function wp_default_scripts( &$scripts ) {
|
||||
$scripts->add( 'editor', "/wp-admin/js/editor$suffix.js", array('utils','jquery'), '20110411' );
|
||||
$scripts->add_data( 'editor', 'group', 1 );
|
||||
|
||||
$scripts->add( 'wp-fullscreen', "/wp-admin/js/wp-fullscreen$suffix.js", array('jquery'), '20110511' );
|
||||
$scripts->add( 'wp-fullscreen', "/wp-admin/js/wp-fullscreen$suffix.js", array('jquery'), '20110512' );
|
||||
$scripts->add_data( 'wp-fullscreen', 'group', 1 );
|
||||
|
||||
$scripts->add( 'prototype', '/wp-includes/js/prototype.js', false, '1.6.1');
|
||||
|
Loading…
Reference in New Issue
Block a user