Merge "Reorder calls so that window is scrollable when trying to scroll to section"

This commit is contained in:
jenkins-bot 2019-06-11 22:18:13 +00:00 committed by Gerrit Code Review
commit 9114e5403b
2 changed files with 8 additions and 2 deletions

View file

@ -266,6 +266,10 @@ ve.init.mw.MobileArticleTarget.prototype.surfaceReady = function () {
return;
}
// Calls scrollSelectionIntoView so must be called before parent,
// which calls goToHeading. (T225292)
this.adjustContentPadding();
// Parent method
ve.init.mw.MobileArticleTarget.super.prototype.surfaceReady.apply( this, arguments );
@ -281,7 +285,6 @@ ve.init.mw.MobileArticleTarget.prototype.surfaceReady = function () {
this.overlay.hideSpinner();
surface.getContext().connect( this, { resize: 'adjustContentPaddingDebounced' } );
this.adjustContentPadding();
this.maybeShowWelcomeDialog();
};

View file

@ -517,7 +517,6 @@ ve.init.mw.ArticleTarget.prototype.surfaceReady = function () {
surfaceModel.connect( this, {
history: 'updateToolbarSaveButtonState'
} );
this.restoreEditSection();
// Iterate over the trigger registry and resolve any access key conflicts
for ( name in ve.ui.triggerRegistry.registry ) {
@ -545,6 +544,10 @@ ve.init.mw.ArticleTarget.prototype.surfaceReady = function () {
// Parent method
ve.init.mw.ArticleTarget.super.prototype.surfaceReady.apply( this, arguments );
// Do this after window is made scrollable on mobile
// ('surfaceReady' handler in VisualEditorOverlay in MobileFrontend)
this.restoreEditSection();
mw.hook( 've.activationComplete' ).fire();
};