From f13407392bc0de3681e0ec4efed6fe94a834d3e2 Mon Sep 17 00:00:00 2001 From: Stephane Bisson Date: Fri, 22 Sep 2017 06:35:58 -0400 Subject: [PATCH] RCFilters: restore watch/unwatch link Use jQuery event delegation to handle all present and future watch/unwatch links. Bug: T176264 Change-Id: If372c480e3e3809485027744b99caa6d4c94f86a --- resources/src/mediawiki.special/mediawiki.special.watchlist.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/src/mediawiki.special/mediawiki.special.watchlist.js b/resources/src/mediawiki.special/mediawiki.special.watchlist.js index 535ca93753..4319be7dd6 100644 --- a/resources/src/mediawiki.special/mediawiki.special.watchlist.js +++ b/resources/src/mediawiki.special/mediawiki.special.watchlist.js @@ -59,7 +59,7 @@ // If a page is on the watchlist, a '×' is shown which, when clicked, removes the page from the watchlist. // After unwatching a page, the '×' becomes a '+', which if clicked re-watches the page. // Unwatched page entries are struck through and have lowered opacity. - $( '.mw-unwatch-link, .mw-watch-link' ).click( function ( event ) { + $( '.mw-changeslist' ).on( 'click', '.mw-unwatch-link, .mw-watch-link', function ( event ) { var $unwatchLink = $( this ), // EnhancedChangesList uses for each row, while OldChangesList uses
  • for each row $watchlistLine = $unwatchLink.closest( 'li, table' ) .find( '[data-target-page]' ), -- 2.20.1