From 9d0f44fd7b16a66de1d9b0d8c5e4ab954d83790f Mon Sep 17 00:00:00 2001 From: Jörn Zaefferer Date: Mon, 12 Jan 2015 17:19:46 +0100 Subject: All: Drop support for jQuery 1.6.x Affects core, effects, position and widget. Only position has unit tests that fail with jQuery 1.6 without the workaround. Drops the 1.6.x copies jQuery of jQuery and removes them from the select in the testsuites. Fixes #10723 Closes gh-1422 --- ui/core.js | 13 ------------- ui/effect.js | 8 -------- ui/position.js | 7 ++----- ui/widget.js | 5 +---- 4 files changed, 3 insertions(+), 30 deletions(-) (limited to 'ui') diff --git a/ui/core.js b/ui/core.js index 224d12b15..afaab689b 100644 --- a/ui/core.js +++ b/ui/core.js @@ -198,19 +198,6 @@ if ( !$.fn.addBack ) { }; } -// support: jQuery 1.6.1, 1.6.2 (http://bugs.jquery.com/ticket/9413) -if ( $( "" ).data( "a-b", "a" ).removeData( "a-b" ).data( "a-b" ) ) { - $.fn.removeData = (function( removeData ) { - return function( key ) { - if ( arguments.length ) { - return removeData.call( this, $.camelCase( key ) ); - } else { - return removeData.call( this ); - } - }; - })( $.fn.removeData ); -} - // deprecated $.ui.ie = !!/msie [\w.]+/.exec( navigator.userAgent.toLowerCase() ); diff --git a/ui/effect.js b/ui/effect.js index f488ffafd..cc9a91045 100644 --- a/ui/effect.js +++ b/ui/effect.js @@ -936,14 +936,6 @@ if ( $.uiBackCompat !== false ) { for ( ; i < length; i++ ) { if ( set[ i ] !== null ) { val = element.data( dataSpace + set[ i ] ); - // support: jQuery 1.6.2 - // http://bugs.jquery.com/ticket/9917 - // jQuery 1.6.2 incorrectly returns undefined for any falsy value. - // We can't differentiate between "" and 0 here, so we just assume - // empty string since it's likely to be a more common value... - if ( val === undefined ) { - val = ""; - } element.css( set[ i ], val ); } } diff --git a/ui/position.js b/ui/position.js index 41e5b6432..1ef4d4c5b 100644 --- a/ui/position.js +++ b/ui/position.js @@ -130,11 +130,8 @@ $.position = { offset: withinElement.offset() || { left: 0, top: 0 }, scrollLeft: withinElement.scrollLeft(), scrollTop: withinElement.scrollTop(), - - // support: jQuery 1.6.x - // jQuery 1.6 doesn't support .outerWidth/Height() on documents or windows - width: isWindow || isDocument ? withinElement.width() : withinElement.outerWidth(), - height: isWindow || isDocument ? withinElement.height() : withinElement.outerHeight() + width: withinElement.outerWidth(), + height: withinElement.outerHeight() }; } }; diff --git a/ui/widget.js b/ui/widget.js index 998855af9..33e0d156e 100644 --- a/ui/widget.js +++ b/ui/widget.js @@ -302,10 +302,7 @@ $.Widget.prototype = { // all event bindings should go through this._on() this.element .unbind( this.eventNamespace ) - .removeData( this.widgetFullName ) - // support: jquery <1.6.3 - // http://bugs.jquery.com/ticket/9413 - .removeData( $.camelCase( this.widgetFullName ) ); + .removeData( this.widgetFullName ); this.widget() .unbind( this.eventNamespace ) .removeAttr( "aria-disabled" ) -- cgit v1.2.3