Merge "jquery.tipsy: Remove support for 'live' option"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Sat, 17 Dec 2016 01:48:46 +0000 (01:48 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Sat, 17 Dec 2016 01:48:46 +0000 (01:48 +0000)
resources/src/jquery.tipsy/jquery.tipsy.js

index 2c6a588..ddda432 100644 (file)
             }
         };
 
-        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;