aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tests/unit/accordion/accordion_core.js6
-rw-r--r--tests/unit/autocomplete/autocomplete_core.js1
-rw-r--r--tests/unit/autocomplete/autocomplete_defaults.js1
-rw-r--r--tests/unit/autocomplete/autocomplete_events.js2
-rw-r--r--tests/unit/autocomplete/autocomplete_options.js27
-rw-r--r--tests/unit/button/button_tickets.js22
-rw-r--r--tests/visual/menu/menu.html2
-rw-r--r--tests/visual/menu/menubar.html75
-rw-r--r--ui/jquery.effects.blind.js2
-rw-r--r--ui/jquery.effects.bounce.js2
-rw-r--r--ui/jquery.effects.clip.js2
-rw-r--r--ui/jquery.effects.core.js35
-rw-r--r--ui/jquery.effects.drop.js2
-rw-r--r--ui/jquery.effects.explode.js2
-rw-r--r--ui/jquery.effects.fade.js2
-rw-r--r--ui/jquery.effects.fold.js2
-rw-r--r--ui/jquery.effects.highlight.js2
-rw-r--r--ui/jquery.effects.pulsate.js2
-rw-r--r--ui/jquery.effects.scale.js6
-rw-r--r--ui/jquery.effects.shake.js2
-rw-r--r--ui/jquery.effects.slide.js2
-rw-r--r--ui/jquery.effects.transfer.js2
-rw-r--r--ui/jquery.ui.accordion.js5
-rw-r--r--ui/jquery.ui.autocomplete.js5
-rw-r--r--ui/jquery.ui.button.js12
-rw-r--r--ui/jquery.ui.datepicker.js8
-rw-r--r--ui/jquery.ui.draggable.js2
-rw-r--r--ui/jquery.ui.droppable.js4
28 files changed, 199 insertions, 38 deletions
diff --git a/tests/unit/accordion/accordion_core.js b/tests/unit/accordion/accordion_core.js
index 24dc0146b..263959851 100644
--- a/tests/unit/accordion/accordion_core.js
+++ b/tests/unit/accordion/accordion_core.js
@@ -28,7 +28,7 @@ test( "ui-accordion-heading class added to headers anchor", function() {
});
test( "accessibility", function () {
- expect( 9 );
+ expect( 13 );
var ac = $( "#list1" ).accordion().accordion( "option", "active", 1 );
var headers = $( ".ui-accordion-header" );
@@ -39,9 +39,13 @@ test( "accessibility", function () {
equals( headers.next().attr( "role" ), "tabpanel", "tabpanel roles" );
equals( headers.eq( 1 ).attr( "aria-expanded" ), "true", "active tab has aria-expanded" );
equals( headers.eq( 0 ).attr( "aria-expanded" ), "false", "inactive tab has aria-expanded" );
+ equals( headers.eq( 1 ).attr( "aria-selected" ), "true", "active tab has aria-selected" );
+ equals( headers.eq( 0 ).attr( "aria-selected" ), "false", "inactive tab has aria-selected" );
ac.accordion( "option", "active", 0 );
equals( headers.eq( 0 ).attr( "aria-expanded" ), "true", "newly active tab has aria-expanded" );
equals( headers.eq( 1 ).attr( "aria-expanded" ), "false", "newly inactive tab has aria-expanded" );
+ equals( headers.eq( 0 ).attr( "aria-selected" ), "true", "active tab has aria-selected" );
+ equals( headers.eq( 1 ).attr( "aria-selected" ), "false", "inactive tab has aria-selected" );
});
}( jQuery ) );
diff --git a/tests/unit/autocomplete/autocomplete_core.js b/tests/unit/autocomplete/autocomplete_core.js
index 2edb8876c..19f52dc15 100644
--- a/tests/unit/autocomplete/autocomplete_core.js
+++ b/tests/unit/autocomplete/autocomplete_core.js
@@ -60,6 +60,7 @@ test( "prevent form submit on enter when menu is active", function() {
test( "allow form submit on enter when menu is not active", function() {
var event;
var ac = $( "#autocomplete" ).autocomplete({
+ autoFocus: false,
source: [ "java", "javascript" ]
}).val( "ja" ).autocomplete( "search" );
diff --git a/tests/unit/autocomplete/autocomplete_defaults.js b/tests/unit/autocomplete/autocomplete_defaults.js
index fc92f3209..e2196ea9e 100644
--- a/tests/unit/autocomplete/autocomplete_defaults.js
+++ b/tests/unit/autocomplete/autocomplete_defaults.js
@@ -4,6 +4,7 @@
var autocomplete_defaults = {
appendTo: "body",
+ autoFocus: true,
delay: 300,
disabled: false,
minLength: 1,
diff --git a/tests/unit/autocomplete/autocomplete_events.js b/tests/unit/autocomplete/autocomplete_events.js
index 20fdb8471..aa0a17730 100644
--- a/tests/unit/autocomplete/autocomplete_events.js
+++ b/tests/unit/autocomplete/autocomplete_events.js
@@ -14,6 +14,7 @@ var data = ["c++", "java", "php", "coldfusion", "javascript", "asp", "ruby", "py
test("all events", function() {
expect(12);
var ac = $("#autocomplete").autocomplete({
+ autoFocus: false,
delay: 0,
source: data,
search: function(event) {
@@ -56,6 +57,7 @@ test("all events", function() {
test("all events - contenteditable", function() {
expect(12);
var ac = $("#autocomplete-contenteditable").autocomplete({
+ autoFocus: false,
delay: 0,
source: data,
search: function(event) {
diff --git a/tests/unit/autocomplete/autocomplete_options.js b/tests/unit/autocomplete/autocomplete_options.js
index 2800fbab8..09cfb6b5f 100644
--- a/tests/unit/autocomplete/autocomplete_options.js
+++ b/tests/unit/autocomplete/autocomplete_options.js
@@ -97,6 +97,33 @@ test( "appendTo", function() {
ac.autocomplete( "destroy" );
});
+test( "autoFocus: false", function() {
+ var ac = $( "#autocomplete" ).autocomplete({
+ autoFocus: false,
+ delay: 0,
+ source: data,
+ open: function( event, ui ) {
+ equals( 0, ac.autocomplete( "widget" ).children( ".ui-menu-item:first .ui-state-focus" ).length, "first item is not auto focused" );
+ start();
+ }
+ });
+ ac.val( "ja" ).keydown();
+ stop();
+});
+
+test( "autoFocus: true", function() {
+ var ac = $( "#autocomplete" ).autocomplete({
+ autoFocus: true,
+ delay: 0,
+ source: data,
+ open: function( event, ui ) {
+ equals( 1, ac.autocomplete( "widget" ).children( ".ui-menu-item:first .ui-state-focus" ).length, "first item is auto focused" );
+ start();
+ }
+ });
+ ac.val( "ja" ).keydown();
+ stop();
+});
test("delay", function() {
var ac = $("#autocomplete").autocomplete({
diff --git a/tests/unit/button/button_tickets.js b/tests/unit/button/button_tickets.js
index 5c5053ded..79bbfeb5c 100644
--- a/tests/unit/button/button_tickets.js
+++ b/tests/unit/button/button_tickets.js
@@ -20,4 +20,26 @@ test( "#6262 - buttonset not applying ui-corner to invisible elements", function
ok( set.find( "label:eq(2)" ).is( ".ui-button.ui-corner-right" ) );
});
+test( "#7092 - button creation that requires a matching label does not find label in all cases", function() {
+ var group = $( "<span><label for='t7092a'/><input type='checkbox' id='t7092a'/></span>" );
+ group.find( "input:checkbox" ).button();
+ ok( group.find( "label" ).is( ".ui-button" ) );
+
+ group = $( "<input type='checkbox' id='t7092b'/><label for='t7092b'/>" );
+ group.filter( "input:checkbox" ).button();
+ ok( group.filter( "label" ).is( ".ui-button" ) );
+
+ group = $( "<span><input type='checkbox' id='t7092c'/></span><label for='t7092c'/>" );
+ group.find( "input:checkbox" ).button();
+ ok( group.filter( "label" ).is( ".ui-button" ) );
+
+ group = $( "<span><input type='checkbox' id='t7092d'/></span><span><label for='t7092d'/></span>" );
+ group.find( "input:checkbox" ).button();
+ ok( group.find( "label" ).is( ".ui-button" ) );
+
+ group = $( "<input type='checkbox' id='t7092e'/><span><label for='t7092e'/></span>" );
+ group.filter( "input:checkbox" ).button();
+ ok( group.find( "label" ).is( ".ui-button" ) );
+});
+
})( jQuery );
diff --git a/tests/visual/menu/menu.html b/tests/visual/menu/menu.html
index 814e26d09..f91e5a3ba 100644
--- a/tests/visual/menu/menu.html
+++ b/tests/visual/menu/menu.html
@@ -40,7 +40,7 @@
</script>
<style>
body { font-size:62.5%; }
- .ui-menu { width: 200px; }
+ .ui-menu { width: 200px; margin-bottom: 2em; }
#menu3 { height: 200px; overflow: auto; }
</style>
</head>
diff --git a/tests/visual/menu/menubar.html b/tests/visual/menu/menubar.html
index 1519c73fc..930f23cc5 100644
--- a/tests/visual/menu/menubar.html
+++ b/tests/visual/menu/menubar.html
@@ -22,7 +22,9 @@
top: 10
}).appendTo(document.body).themeswitcher();
- $(".menubar").menubar({
+ $("td:has(.menubar)").clone().appendTo("tbody tr:not(:first)");
+
+ $("#bar1, .menubar").menubar({
select: function(event, ui) {
$("<div/>").text("Selected: " + ui.item.text()).appendTo("#log");
}
@@ -35,13 +37,11 @@
$("<div/>").text("Selected: " + ui.item.text()).appendTo("#log");
}
});
-
-
});
</script>
<style type="text/css">
body { font-size:62.5%; }
- .menubar { margin: 0 0 4em; } /* style for this page only */
+ #bar1, #bar2 { margin: 0 0 4em; } /* style for this page only */
.ui-menu { width: 200px; position: absolute; outline: none; z-index: 9999; }
.ui-menu .ui-icon { float: right; }
.ui-menu li.ui-state-disabled {
@@ -55,12 +55,18 @@
.ui-menubar .ui-button { float: left; font-weight: normal; border-top-width: 0 !important; border-bottom-width: 0 !important; margin: 0; }
.ui-menubar .ui-menubar-link { border-right: 1px dashed transparent; border-left: 1px dashed transparent; }
-
- </style>
+ table {
+ border-collapse: collapse;
+ }
+ th, td {
+ padding: 0.5em;
+ border: 1px solid black;
+ }
+ </style>
</head>
<body>
-<div class="menubar">
+<div id="bar1" class="menubar">
<a href="#">File</a>
<ul>
<li><a href="#">Open...</a></li>
@@ -100,7 +106,7 @@
</ul>
</div>
-<div class="menubar-icons">
+<div id="bar2" class="menubar-icons">
<a href="#">File</a>
<ul>
<li><a href="#">Open...</a></li>
@@ -140,6 +146,59 @@
</ul>
</div>
+<table id="movies" class="ui-widget">
+ <thead>
+ <tr>
+ <th data-field="Name" class="ui-widget-header">Name</th>
+ <th data-field="ReleaseYear" class="ui-widget-header">Release Year</th>
+ <th data-field="AverageRating" class="ui-widget-header">Average Rating</th>
+ <th class="ui-widget-header"></th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td class="ui-widget-content">Red Hot Chili Peppers: Funky Monks</td>
+ <td class="ui-widget-content">1993</td>
+ <td class="ui-widget-content">3.6</td>
+ <td class="ui-widget-content">
+ <div class="menubar">
+ <a href="#">Options</a>
+ <ul>
+ <li><a href="#">Order...</a></li>
+ <li class="ui-state-disabled">Write a Review...</li>
+ <li><a href="#">Find Similar Movies...</a></li>
+ <li>
+ <a href="#">Rate</a>
+ <ul>
+ <li><a href="#">5 stars</a></li>
+ <li><a href="#">4 stars</a></li>
+ <li><a href="#">3 stars</a></li>
+ <li><a href="#">2 stars</a></li>
+ <li><a href="#">1 stars</a></li>
+ </ul>
+ </li>
+ </ul>
+ </div>
+ </td>
+ </tr>
+ <tr>
+ <td class="ui-widget-content">Rod Stewart: Storyteller 1984-1991</td>
+ <td class="ui-widget-content">1991</td>
+ <td class="ui-widget-content">3.1</td>
+ </tr>
+ <tr>
+ <td class="ui-widget-content">Stevie Ray Vaughan and Double Trouble: Live at the El Mocambo 1983</td>
+ <td class="ui-widget-content">1991</td>
+ <td class="ui-widget-content">3.9</td>
+ </tr>
+ <tr>
+ <td class="ui-widget-content">Spike and Mike's Sick &amp; Twisted Festival of Animation</td>
+ <td class="ui-widget-content">1997</td>
+ <td class="ui-widget-content">2.6</td>
+ </tr>
+ </tbody>
+</table>
+
<div class="ui-widget" style="margin-top:2em; font-family:Arial">
Log:
<div id="log" style="height: 400px; width: 300px; overflow: auto;" class="ui-widget-content"></div>
diff --git a/ui/jquery.effects.blind.js b/ui/jquery.effects.blind.js
index 0c865d59f..6b7250789 100644
--- a/ui/jquery.effects.blind.js
+++ b/ui/jquery.effects.blind.js
@@ -12,7 +12,7 @@
*/
(function( $, undefined ) {
-$.effects.blind = function( o ) {
+$.effects.effect.blind = function( o ) {
return this.queue( function() {
diff --git a/ui/jquery.effects.bounce.js b/ui/jquery.effects.bounce.js
index d5b43492e..8da0feb76 100644
--- a/ui/jquery.effects.bounce.js
+++ b/ui/jquery.effects.bounce.js
@@ -14,7 +14,7 @@
var rshowhide = /show|hide/;
-$.effects.bounce = function(o) {
+$.effects.effect.bounce = function(o) {
return this.queue(function() {
diff --git a/ui/jquery.effects.clip.js b/ui/jquery.effects.clip.js
index 8cf91da57..14b358dfa 100644
--- a/ui/jquery.effects.clip.js
+++ b/ui/jquery.effects.clip.js
@@ -12,7 +12,7 @@
*/
(function( $, undefined ) {
-$.effects.clip = function( o ) {
+$.effects.effect.clip = function( o ) {
return this.queue( function() {
diff --git a/ui/jquery.effects.core.js b/ui/jquery.effects.core.js
index 0d326954a..573cb2554 100644
--- a/ui/jquery.effects.core.js
+++ b/ui/jquery.effects.core.js
@@ -9,7 +9,11 @@
*/
;jQuery.effects || (function($, undefined) {
-$.effects = {};
+var backCompat = $.uiBackCompat !== false;
+
+$.effects = {
+ effect: {}
+};
/******************************************************************************/
/****************************** COLOR ANIMATIONS ******************************/
@@ -493,7 +497,11 @@ function standardSpeed( speed ) {
}
// invalid strings - treat as "normal" speed
- if ( typeof speed === "string" && !$.effects[ speed ] ) {
+ if ( typeof speed === "string" && !$.effects.effect[ speed ] ) {
+ // TODO: remove in 2.0 (#7115)
+ if ( backCompat && $.effects[ speed ] ) {
+ return false;
+ }
return true;
}
@@ -504,9 +512,12 @@ $.fn.extend({
effect: function( effect, options, speed, callback ) {
var args = _normalizeArguments.apply( this, arguments ),
mode = args.mode,
- effectMethod = $.effects[ args.effect ];
-
- if ( $.fx.off || !effectMethod ) {
+ effectMethod = $.effects.effect[ args.effect ],
+
+ // DEPRECATED: remove in 2.0 (#7115)
+ oldEffectMethod = !effectMethod && backCompat && $.effects[ args.effect ];
+
+ if ( $.fx.off || !( effectMethod || oldEffectMethod ) ) {
// delegate to the original method (e.g., .show()) if possible
if ( mode ) {
return this[ mode ]( args.duration, args.complete );
@@ -518,7 +529,19 @@ $.fn.extend({
});
}
}
- return effectMethod.call( this, args );
+
+ // TODO: remove this check in 2.0, effectMethod will always be true
+ if ( effectMethod ) {
+ return effectMethod.call( this, args );
+ } else {
+ // DEPRECATED: remove in 2.0 (#7115)
+ return oldEffectMethod.call(this, {
+ options: args,
+ duration: args.duration,
+ callback: args.complete,
+ mode: args.mode
+ });
+ }
},
_show: $.fn.show,
diff --git a/ui/jquery.effects.drop.js b/ui/jquery.effects.drop.js
index b88a8c428..24fb89db0 100644
--- a/ui/jquery.effects.drop.js
+++ b/ui/jquery.effects.drop.js
@@ -12,7 +12,7 @@
*/
(function( $, undefined ) {
-$.effects.drop = function( o ) {
+$.effects.effect.drop = function( o ) {
return this.queue( function() {
diff --git a/ui/jquery.effects.explode.js b/ui/jquery.effects.explode.js
index fa2707b5e..f5217ecb5 100644
--- a/ui/jquery.effects.explode.js
+++ b/ui/jquery.effects.explode.js
@@ -12,7 +12,7 @@
*/
(function( $, undefined ) {
-$.effects.explode = function( o ) {
+$.effects.effect.explode = function( o ) {
return this.queue( function( next ) {
diff --git a/ui/jquery.effects.fade.js b/ui/jquery.effects.fade.js
index 825c84e78..5fa0319c0 100644
--- a/ui/jquery.effects.fade.js
+++ b/ui/jquery.effects.fade.js
@@ -12,7 +12,7 @@
*/
(function( $, undefined ) {
-$.effects.fade = function( o ) {
+$.effects.effect.fade = function( o ) {
return this.queue( function() {
var el = $( this ),
mode = $.effects.setMode( el, o.mode || 'hide' );
diff --git a/ui/jquery.effects.fold.js b/ui/jquery.effects.fold.js
index 19e97c40f..29da090cb 100644
--- a/ui/jquery.effects.fold.js
+++ b/ui/jquery.effects.fold.js
@@ -12,7 +12,7 @@
*/
(function( $, undefined ) {
-$.effects.fold = function( o ) {
+$.effects.effect.fold = function( o ) {
return this.queue( function() {
diff --git a/ui/jquery.effects.highlight.js b/ui/jquery.effects.highlight.js
index b2ffb15e8..cd4f0705a 100644
--- a/ui/jquery.effects.highlight.js
+++ b/ui/jquery.effects.highlight.js
@@ -12,7 +12,7 @@
*/
(function( $, undefined ) {
-$.effects.highlight = function( o ) {
+$.effects.effect.highlight = function( o ) {
return this.queue( function() {
var elem = $( this ),
props = [ 'backgroundImage', 'backgroundColor', 'opacity' ],
diff --git a/ui/jquery.effects.pulsate.js b/ui/jquery.effects.pulsate.js
index c5f67b12b..b168b6ef5 100644
--- a/ui/jquery.effects.pulsate.js
+++ b/ui/jquery.effects.pulsate.js
@@ -12,7 +12,7 @@
*/
(function( $, undefined ) {
-$.effects.pulsate = function( o ) {
+$.effects.effect.pulsate = function( o ) {
return this.queue( function() {
var elem = $( this ),
mode = $.effects.setMode( elem, o.mode || 'show' ),
diff --git a/ui/jquery.effects.scale.js b/ui/jquery.effects.scale.js
index fcc0708b9..8f25ca9a8 100644
--- a/ui/jquery.effects.scale.js
+++ b/ui/jquery.effects.scale.js
@@ -12,7 +12,7 @@
*/
(function( $, undefined ) {
-$.effects.puff = function( o ) {
+$.effects.effect.puff = function( o ) {
return this.queue( function() {
var elem = $( this ),
mode = $.effects.setMode( elem, o.mode || 'hide' ),
@@ -40,7 +40,7 @@ $.effects.puff = function( o ) {
});
};
-$.effects.scale = function( o ) {
+$.effects.effect.scale = function( o ) {
return this.queue( function() {
@@ -92,7 +92,7 @@ $.effects.scale = function( o ) {
};
-$.effects.size = function( o ) {
+$.effects.effect.size = function( o ) {
return this.queue( function() {
// Create element
diff --git a/ui/jquery.effects.shake.js b/ui/jquery.effects.shake.js
index 5e8875abe..a1ba1577c 100644
--- a/ui/jquery.effects.shake.js
+++ b/ui/jquery.effects.shake.js
@@ -12,7 +12,7 @@
*/
(function( $, undefined ) {
-$.effects.shake = function( o ) {
+$.effects.effect.shake = function( o ) {
return this.queue( function() {
diff --git a/ui/jquery.effects.slide.js b/ui/jquery.effects.slide.js
index eeba117cf..6b0296754 100644
--- a/ui/jquery.effects.slide.js
+++ b/ui/jquery.effects.slide.js
@@ -12,7 +12,7 @@
*/
(function( $, undefined ) {
-$.effects.slide = function( o ) {
+$.effects.effect.slide = function( o ) {
return this.queue( function() {
diff --git a/ui/jquery.effects.transfer.js b/ui/jquery.effects.transfer.js
index 79b1577d9..17d23c5fa 100644
--- a/ui/jquery.effects.transfer.js
+++ b/ui/jquery.effects.transfer.js
@@ -12,7 +12,7 @@
*/
(function( $, undefined ) {
-$.effects.transfer = function( o ) {
+$.effects.effect.transfer = function( o ) {
return this.queue( function() {
var elem = $( this ),
diff --git a/ui/jquery.ui.accordion.js b/ui/jquery.ui.accordion.js
index 34327be27..7f67814b4 100644
--- a/ui/jquery.ui.accordion.js
+++ b/ui/jquery.ui.accordion.js
@@ -75,6 +75,7 @@ $.widget( "ui.accordion", {
.not( self.active )
.attr({
"aria-expanded": "false",
+ "aria-selected": "false",
tabIndex: -1
})
.next()
@@ -87,6 +88,7 @@ $.widget( "ui.accordion", {
self.active
.attr({
"aria-expanded": "true",
+ "aria-selected": "true",
tabIndex: 0
});
}
@@ -129,6 +131,7 @@ $.widget( "ui.accordion", {
.removeClass( "ui-accordion-header ui-accordion-disabled ui-helper-reset ui-state-default ui-corner-all ui-state-active ui-state-disabled ui-corner-top" )
.removeAttr( "role" )
.removeAttr( "aria-expanded" )
+ .removeAttr( "aria-selected" )
.removeAttr( "tabIndex" )
.find( "a" )
.removeAttr( "tabIndex" )
@@ -387,12 +390,14 @@ $.widget( "ui.accordion", {
toHide.prev()
.attr({
"aria-expanded": "false",
+ "aria-selected": "false",
tabIndex: -1
})
.blur();
toShow.prev()
.attr({
"aria-expanded": "true",
+ "aria-selected": "true",
tabIndex: 0
})
.focus();
diff --git a/ui/jquery.ui.autocomplete.js b/ui/jquery.ui.autocomplete.js
index c83f042c0..a9e4b4119 100644
--- a/ui/jquery.ui.autocomplete.js
+++ b/ui/jquery.ui.autocomplete.js
@@ -22,6 +22,7 @@ $.widget( "ui.autocomplete", {
defaultElement: "<input>",
options: {
appendTo: "body",
+ autoFocus: true,
delay: 300,
minLength: 1,
position: {
@@ -362,6 +363,10 @@ $.widget( "ui.autocomplete", {
this.menu.blur();
this.menu.refresh();
+ if ( this.options.autoFocus ) {
+ this.menu.next( new $.Event("mouseover") );
+ }
+
// size and position menu
ul.show();
this._resizeMenu();
diff --git a/ui/jquery.ui.button.js b/ui/jquery.ui.button.js
index 134dae3d3..9cf8974b2 100644
--- a/ui/jquery.ui.button.js
+++ b/ui/jquery.ui.button.js
@@ -201,8 +201,16 @@ $.widget( "ui.button", {
if ( this.type === "checkbox" || this.type === "radio" ) {
// we don't search against the document in case the element
// is disconnected from the DOM
- this.buttonElement = this.element.parents().last()
- .find( "label[for=" + this.element.attr("id") + "]" );
+ var ancestor = this.element.parents().last(),
+ labelSelector = "label[for=" + this.element.attr("id") + "]";
+ this.buttonElement = ancestor.find( labelSelector );
+ if ( !this.buttonElement.length ) {
+ ancestor = ancestor.length ? ancestor.siblings() : this.element.siblings();
+ this.buttonElement = ancestor.filter( labelSelector );
+ if ( !this.buttonElement.length ) {
+ this.buttonElement = ancestor.find( labelSelector );
+ }
+ }
this.element.addClass( "ui-helper-hidden-accessible" );
var checked = this.element.is( ":checked" );
diff --git a/ui/jquery.ui.datepicker.js b/ui/jquery.ui.datepicker.js
index 8dd9bf3dc..670955f64 100644
--- a/ui/jquery.ui.datepicker.js
+++ b/ui/jquery.ui.datepicker.js
@@ -656,7 +656,9 @@ $.extend(Datepicker.prototype, {
}
};
inst.dpDiv.zIndex($(input).zIndex()+1);
- if ($.effects && $.effects[showAnim])
+
+ // DEPRECATED: after BC for 1.8.x $.effects[ showAnim ] is not needed
+ if ( $.effects && ( $.effects.effect[ showAnim ] || $.effects[ showAnim ] ) )
inst.dpDiv.show(showAnim, $.datepicker._get(inst, 'showOptions'), duration, postProcess);
else
inst.dpDiv[showAnim || 'show']((showAnim ? duration : null), postProcess);
@@ -781,7 +783,9 @@ $.extend(Datepicker.prototype, {
$.datepicker._tidyDialog(inst);
this._curInst = null;
};
- if ($.effects && $.effects[showAnim])
+
+ // DEPRECATED: after BC for 1.8.x $.effects[ showAnim ] is not needed
+ if ( $.effects && ( $.effects.effect[ showAnim ] || $.effects[ showAnim ] ) )
inst.dpDiv.hide(showAnim, $.datepicker._get(inst, 'showOptions'), duration, postProcess);
else
inst.dpDiv[(showAnim == 'slideDown' ? 'slideUp' :
diff --git a/ui/jquery.ui.draggable.js b/ui/jquery.ui.draggable.js
index 304240130..ff1ad1363 100644
--- a/ui/jquery.ui.draggable.js
+++ b/ui/jquery.ui.draggable.js
@@ -477,7 +477,7 @@ $.ui.plugin.add("draggable", "connectToSortable", {
instance: sortable,
shouldRevert: sortable.options.revert
});
- sortable._refreshItems(); //Do a one-time refresh at start to refresh the containerCache
+ sortable.refreshPositions(); // Call the sortable's refreshPositions at drag start to refresh the containerCache since the sortable container cache is used in drag and needs to be up to date (this will ensure it's initialised as well as being kept in step with any changes that might have happened on the page).
sortable._trigger("activate", event, uiSortable);
}
});
diff --git a/ui/jquery.ui.droppable.js b/ui/jquery.ui.droppable.js
index decdc1712..b8a93cd46 100644
--- a/ui/jquery.ui.droppable.js
+++ b/ui/jquery.ui.droppable.js
@@ -212,11 +212,11 @@ $.ui.ddmanager = {
for (var j=0; j < list.length; j++) { if(list[j] == m[i].element[0]) { m[i].proportions.height = 0; continue droppablesLoop; } }; //Filter out elements in the current dragged item
m[i].visible = m[i].element.css("display") != "none"; if(!m[i].visible) continue; //If the element is not visible, continue
+ if(type == "mousedown") m[i]._activate.call(m[i], event); //Activate the droppable if used directly from draggables
+
m[i].offset = m[i].element.offset();
m[i].proportions = { width: m[i].element[0].offsetWidth, height: m[i].element[0].offsetHeight };
- if(type == "mousedown") m[i]._activate.call(m[i], event); //Activate the droppable if used directly from draggables
-
}
},