mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-09-25 11:16:51 +00:00
Merge "Reorder calls so that window is scrollable when trying to scroll to section"
This commit is contained in:
commit
9114e5403b
|
@ -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();
|
||||
};
|
||||
|
|
|
@ -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();
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue