DesktopArticleTarget.init: Identify our events on multi section edit links

This is now consistent with all other events.

Needed for I9904e8af4a60b0f5e9a6e263cd4fd8e1e3fd1f98.

Change-Id: If52aa9d619eac08456874fc75c0f6e1adff01246
This commit is contained in:
Bartosz Dziewoński 2020-05-07 21:42:56 +02:00
parent 687cdc84e8
commit 91f3a971f4

View file

@ -820,11 +820,11 @@
// init without refresh as that'd initialise for the wrong rev id (T52925)
// and would preserve the wrong DOM with a diff on top.
$editsections.find( '.mw-editsection-visualeditor' )
.on( 'click', init.onEditSectionLinkClick.bind( init, 'visual' ) );
.off( '.ve-target' ).on( 'click.ve-target', init.onEditSectionLinkClick.bind( init, 'visual' ) );
if ( init.isWikitextAvailable ) {
// TOOD: Make this less fragile
$editsections.find( 'a:not( .mw-editsection-visualeditor )' )
.on( 'click', init.onEditSectionLinkClick.bind( init, 'source' ) );
.off( '.ve-target' ).on( 'click.ve-target', init.onEditSectionLinkClick.bind( init, 'source' ) );
}
}
},