Make new topic autosave specific to page title

Bug: T274949
Change-Id: I7e1bbcd6c606c7443f55fe3b1780021b07b28c5e
This commit is contained in:
Bartosz Dziewoński 2021-02-17 13:30:03 +01:00
parent b7917f5fa4
commit 717955a513
2 changed files with 2 additions and 2 deletions

View file

@ -33,7 +33,7 @@ function NewTopicController( $pageContainer, $replyLink ) {
endContainer: this.sectionTitleField.$element[ 0 ],
endOffset: this.sectionTitleField.$element[ 0 ].childNodes.length
} );
comment.id = 'new';
comment.id = 'new|' + mw.config.get( 'wgRelevantPageName' );
comment.isNewTopic = true;
NewTopicController.super.call( this, $pageContainer, $replyLink, comment );

View file

@ -331,7 +331,7 @@ function init( $container, state ) {
// For debugging (now unused in the code)
mw.dt.pageThreads = pageThreads;
if ( state.repliedTo === 'new' ) {
if ( state.repliedTo === 'new|' + mw.config.get( 'wgRelevantPageName' ) ) {
// Highlight the last comment on the page
lastComment = threadItems[ threadItems.length - 1 ];
highlight( lastComment );