mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/DiscussionTools
synced 2024-11-24 08:23:52 +00:00
Avoid duplicating new topic tool if there are multiple .mw-parser-output elements
Bug: T337476 Change-Id: I581e4a584b3f18597e17f157478d9f4ade41c24e
This commit is contained in:
parent
c28bcaaabd
commit
291808ff2b
|
@ -73,7 +73,7 @@ NewTopicController.prototype.setup = function ( mode ) {
|
|||
|
||||
// Insert directly after the page content on already existing pages
|
||||
// (.mw-parser-output is missing on non-existent pages)
|
||||
var $parserOutput = this.$pageContainer.find( '.mw-parser-output' );
|
||||
var $parserOutput = this.$pageContainer.find( '.mw-parser-output' ).first();
|
||||
var $mobileAddTopicWrapper = this.$pageContainer.find( '.ext-discussiontools-init-new-topic' );
|
||||
if ( $parserOutput.length ) {
|
||||
$parserOutput.after( this.container.$element );
|
||||
|
|
Loading…
Reference in a new issue