After saving and setting HTML, set single-editor edit section handlers again

Change-Id: I6e0962271e7e1460abbe82864b47fddc5bd7f235
This commit is contained in:
Alex Monk 2016-02-25 10:33:14 +00:00 committed by James D. Forrester
parent 1ad77ddf91
commit 7788aece55

View file

@ -1259,6 +1259,16 @@ ve.init.mw.DesktopArticleTarget.prototype.replacePageContent = function (
// Remove any VE-added redirectMsg
$( '.redirectMsg' ).remove();
// Re-set any single-editor edit section handlers
if (
$content.find( '.mw-editsection' ).length &&
!$content.find( '.mw-editsection-visualeditor' ).length
) {
$content
.find( '.mw-editsection a' )
.on( 'click', mw.libs.ve.onEditSectionLinkClick );
}
mw.hook( 'wikipage.content' ).fire( $editableContent.empty().append( $content ) );
if ( displayTitle ) {
$( '#content #firstHeading' ).html( displayTitle );