From 91f3a971f4dfbd8d0fc96484785ae57fc242024d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartosz=20Dziewo=C5=84ski?= Date: Thu, 7 May 2020 21:42:56 +0200 Subject: [PATCH] DesktopArticleTarget.init: Identify our events on multi section edit links This is now consistent with all other events. Needed for I9904e8af4a60b0f5e9a6e263cd4fd8e1e3fd1f98. Change-Id: If52aa9d619eac08456874fc75c0f6e1adff01246 --- modules/ve-mw/preinit/ve.init.mw.DesktopArticleTarget.init.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/ve-mw/preinit/ve.init.mw.DesktopArticleTarget.init.js b/modules/ve-mw/preinit/ve.init.mw.DesktopArticleTarget.init.js index 1943c1c43e..5a1acf3aaa 100644 --- a/modules/ve-mw/preinit/ve.init.mw.DesktopArticleTarget.init.js +++ b/modules/ve-mw/preinit/ve.init.mw.DesktopArticleTarget.init.js @@ -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' ) ); } } },