From bb79e5f889004dd9b0a55136fac7f0b18d812b20 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bartosz=20Dziewo=C5=84ski?= Date: Mon, 25 Jul 2016 13:37:45 +0200 Subject: [PATCH] jquery.tipsy: Remove support for 'live' option Follows-up aa524075ac from 2014. It was relying on jQuery features that have been deprecated a long time ago, officially removed in jQuery 1.11, and removed for real in 3.0. We have to get rid of it at some point. As far as I can tell, nothing in our repositories uses this option anymore. Rather than remove the code and diverge further from upstream Tipsy, I'm just making it throw an error if this is passed. Maybe one day we'll upgrade Tipsy too to some modern version and this will then disappear. Bug: T85048 Change-Id: I7dca8334556b1079cd4fee2e6e921232fe3d46ef --- resources/src/jquery.tipsy/jquery.tipsy.js | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/resources/src/jquery.tipsy/jquery.tipsy.js b/resources/src/jquery.tipsy/jquery.tipsy.js index 2c6a5887e0..ddda432f32 100644 --- a/resources/src/jquery.tipsy/jquery.tipsy.js +++ b/resources/src/jquery.tipsy/jquery.tipsy.js @@ -197,24 +197,18 @@ } }; - if (!options.live) this.each(function() { get(this); }); + this.each(function() { get(this); }); if ( options.trigger != 'manual' ) { var eventIn = options.trigger == 'hover' ? 'mouseenter focus' : 'focus', eventOut = options.trigger == 'hover' ? 'mouseleave blur' : 'blur'; if ( options.live ) { mw.track( 'mw.deprecate', 'tipsy-live' ); - mw.log.warn( 'Use of the "live" option of jquery.tipsy is deprecated.' ); - // XXX: The official status of 'context' is deprecated, and the official status of - // 'selector' is removed, so this really needs to go. - $( this.context ) - .on( eventIn, this.selector, enter ) - .on( eventOut, this.selector, leave ); - } else { - this - .on( eventIn, enter ) - .on( eventOut, leave ); + mw.log.warn( 'Use of the "live" option of jquery.tipsy is no longer supported.' ); } + this + .on( eventIn, enter ) + .on( eventOut, leave ); } return this; -- 2.20.1