DLynch has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/384560 )
Change subject: init.mw.DesktopArticleTarget: properly set up section links ...................................................................... init.mw.DesktopArticleTarget: properly set up section links We were reimplementing (poorly) setupMultiSectionLinks from the .init version. Just call the original. Bug: T151021 Change-Id: I65bd7c5ecf75c478d6babeb13e7fb2a76a9842c8 --- M modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js 1 file changed, 1 insertion(+), 12 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor refs/changes/60/384560/1 diff --git a/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js b/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js index 8064a3f..7adc0b3 100644 --- a/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js +++ b/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js @@ -1403,18 +1403,7 @@ } // Re-set any edit section handlers now that the page content has been replaced - if ( - // editsection but no editsection-visualeditor: - // whole editsection triggers VE - $content.find( '.mw-editsection' ).length && - !$content.find( '.mw-editsection-visualeditor' ).length - ) { - $veSectionLinks = $content.find( '.mw-editsection a' ); - } else { - // Otherwise, put it on the editsection-visualeditor links - $veSectionLinks = $content.find( 'a.mw-editsection-visualeditor' ); - } - $veSectionLinks.on( 'click', mw.libs.ve.onEditSectionLinkClick.bind( mw.libs.ve, 'visual' ) ); + mw.libs.ve.setupMultiSectionLinks(); mw.hook( 'wikipage.content' ).fire( this.$editableContent.empty().append( $content ) ); if ( displayTitle ) { -- To view, visit https://gerrit.wikimedia.org/r/384560 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I65bd7c5ecf75c478d6babeb13e7fb2a76a9842c8 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/VisualEditor Gerrit-Branch: master Gerrit-Owner: DLynch <dly...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits