mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/MinervaNeue
synced 2024-11-27 15:40:15 +00:00
Merge "Use lead section when editing page without section marks"
This commit is contained in:
commit
9a6770ee18
|
@ -250,8 +250,11 @@
|
|||
$( '.nojs-edit' ).removeClass( 'nojs-edit' );
|
||||
$( '#ca-edit a' ).remove();
|
||||
// FIXME: unfortunately the main page is special cased.
|
||||
if ( mw.config.get( 'wgIsMainPage' ) || isNewPage || ( leadSection && leadSection.text() ) ) {
|
||||
if ( mw.config.get( 'wgIsMainPage' ) || isNewPage ||
|
||||
( leadSection && leadSection.text() ) || page.getSections().length === 0 ) {
|
||||
// if lead section is not empty, open editor with lead section
|
||||
// In some namespaces (controlled by MFNamespacesWithoutCollapsibleSections)
|
||||
// sections are not marked. Use the lead section for such cases.
|
||||
addEditButton( 0, '#ca-edit' );
|
||||
} else {
|
||||
// if lead section is empty or does not exist, open editor with first section
|
||||
|
|
Loading…
Reference in a new issue