mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-14 10:04:52 +00:00
Don't set a ParameterPage as next selection after delete
This can only happen when deleting the last part of a transclusion, then we want to set the previous page as selected. This should never be a parameter though. Bug: T312221 Change-Id: I06700dcf37f6d4f7dd073f8f2bc1b8b0a17a62c4
This commit is contained in:
parent
ec522938b8
commit
5067a1e216
|
@ -299,9 +299,10 @@ ve.ui.MWTwoPaneTransclusionDialogLayout.prototype.removePages = function ( pages
|
|||
isCurrentPageRemoved = true;
|
||||
}
|
||||
} else {
|
||||
if ( !isCurrentPageRemoved ) {
|
||||
// avoid choosing a parameter as previous selection
|
||||
if ( !isCurrentPageRemoved && pageName.indexOf( '/' ) === -1 ) {
|
||||
prevSelectionCandidate = pageName;
|
||||
} else if ( !nextSelectionCandidate ) {
|
||||
} else if ( isCurrentPageRemoved && !nextSelectionCandidate ) {
|
||||
nextSelectionCandidate = pageName;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue