mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-30 17:14:42 +00:00
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:
parent
687cdc84e8
commit
91f3a971f4
|
@ -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' ) );
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue