Skip to content

Commit

Permalink
Site Settings: Reset scroll position in the stats controller instead …
Browse files Browse the repository at this point in the history
…of `DeleteSite`
  • Loading branch information
drewblaisdell committed Dec 4, 2015
1 parent ff90769 commit 6d4711d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 1 addition & 2 deletions client/my-sites/site-settings/delete-site/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -190,8 +190,7 @@ module.exports = React.createClass( {

SiteListActions.deleteSite( this.state.site, function( success ) {
if ( success ) {
window.scrollTo( 0, 0 );
page( '/stats' );
page.redirect( '/stats' );
}
}.bind( this ) );
},
Expand Down
2 changes: 2 additions & 0 deletions client/my-sites/stats/controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,8 @@ module.exports = {
statSummaryList,
summarySites;

window.scrollTo( 0, 0 );

titleActions.setTitle( i18n.translate( 'Stats', { textOnly: true } ) );

activeFilter = filters().filter( function( filter ) {
Expand Down

0 comments on commit 6d4711d

Please sign in to comment.