mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-15 02:23:58 +00:00
Fixes for focusPart
We missed some usages. Follows up on I5f05bc119dc213d8 Change-Id: Iaecb804300c37d43108a14e8db0068deb58f503c
This commit is contained in:
parent
c29690b1f1
commit
d138cd04bf
|
@ -96,7 +96,8 @@ ve.ui.MWTransclusionDialog.prototype.onOutlineControlsMove = function ( places )
|
|||
// Move part to new location, and if dialog is loaded switch to new part page
|
||||
var promise = this.transclusionModel.addPart( part, newPlace );
|
||||
if ( this.loaded && !this.preventReselection ) {
|
||||
promise.done( this.focusPart.bind( this, part.getId() ) );
|
||||
// FIXME: Should be handled internally to bookletLayout.
|
||||
promise.done( this.bookletLayout.focusPart.bind( this.bookletLayout, part.getId() ) );
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -162,7 +163,7 @@ ve.ui.MWTransclusionDialog.prototype.addParameter = function () {
|
|||
// these magical "empty" constants.
|
||||
var placeholderParameter = new ve.dm.MWParameterModel( part );
|
||||
part.addParameter( placeholderParameter );
|
||||
this.focusPart( placeholderParameter.getId() );
|
||||
this.bookletLayout.focusPart( placeholderParameter.getId() );
|
||||
|
||||
this.autoExpandSidebar();
|
||||
};
|
||||
|
@ -373,7 +374,7 @@ ve.ui.MWTransclusionDialog.prototype.toggleSidebar = function ( expandSidebar )
|
|||
} else {
|
||||
selectedPage.scrollElementIntoView();
|
||||
// TODO: Find a reliable way to refocus.
|
||||
// dialog.focusPart( name );
|
||||
// dialog.bookletLayout.focusPart( name );
|
||||
}
|
||||
}, OO.ui.theme.getDialogTransitionDuration() );
|
||||
}
|
||||
|
@ -428,7 +429,7 @@ ve.ui.MWTransclusionDialog.prototype.addPart = function ( part ) {
|
|||
// Add the part, and if dialog is loaded switch to part page
|
||||
var promise = this.transclusionModel.addPart( part, index );
|
||||
if ( this.loaded && !this.preventReselection ) {
|
||||
promise.done( this.focusPart.bind( this, part.getId() ) );
|
||||
promise.done( this.bookletLayout.focusPart.bind( this.bookletLayout, part.getId() ) );
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue