mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-09-25 11:16:51 +00:00
After saving and setting HTML, set single-editor edit section handlers again
Change-Id: I6e0962271e7e1460abbe82864b47fddc5bd7f235
This commit is contained in:
parent
1ad77ddf91
commit
7788aece55
|
@ -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 );
|
||||
|
|
Loading…
Reference in a new issue