jquery-ui-rails 5.0.3 → 5.0.4

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of jquery-ui-rails might be problematic. Click here for more details.

Files changed (61) hide show
  1. data/VERSIONS.md +1 -0
  2. data/app/assets/javascripts/jquery-ui/accordion.js +10 -7
  3. data/app/assets/javascripts/jquery-ui/autocomplete.js +3 -3
  4. data/app/assets/javascripts/jquery-ui/button.js +4 -4
  5. data/app/assets/javascripts/jquery-ui/core.js +4 -4
  6. data/app/assets/javascripts/jquery-ui/datepicker-ar.js +7 -6
  7. data/app/assets/javascripts/jquery-ui/datepicker.js +8 -4
  8. data/app/assets/javascripts/jquery-ui/dialog.js +3 -3
  9. data/app/assets/javascripts/jquery-ui/draggable.js +3 -3
  10. data/app/assets/javascripts/jquery-ui/droppable.js +3 -3
  11. data/app/assets/javascripts/jquery-ui/effect-blind.js +2 -2
  12. data/app/assets/javascripts/jquery-ui/effect-bounce.js +2 -2
  13. data/app/assets/javascripts/jquery-ui/effect-clip.js +2 -2
  14. data/app/assets/javascripts/jquery-ui/effect-drop.js +2 -2
  15. data/app/assets/javascripts/jquery-ui/effect-explode.js +2 -2
  16. data/app/assets/javascripts/jquery-ui/effect-fade.js +2 -2
  17. data/app/assets/javascripts/jquery-ui/effect-fold.js +2 -2
  18. data/app/assets/javascripts/jquery-ui/effect-highlight.js +2 -2
  19. data/app/assets/javascripts/jquery-ui/effect-puff.js +2 -2
  20. data/app/assets/javascripts/jquery-ui/effect-pulsate.js +2 -2
  21. data/app/assets/javascripts/jquery-ui/effect-scale.js +2 -2
  22. data/app/assets/javascripts/jquery-ui/effect-shake.js +2 -2
  23. data/app/assets/javascripts/jquery-ui/effect-size.js +2 -2
  24. data/app/assets/javascripts/jquery-ui/effect-slide.js +2 -2
  25. data/app/assets/javascripts/jquery-ui/effect-transfer.js +2 -2
  26. data/app/assets/javascripts/jquery-ui/effect.js +3 -3
  27. data/app/assets/javascripts/jquery-ui/menu.js +3 -3
  28. data/app/assets/javascripts/jquery-ui/mouse.js +3 -3
  29. data/app/assets/javascripts/jquery-ui/position.js +4 -4
  30. data/app/assets/javascripts/jquery-ui/progressbar.js +3 -3
  31. data/app/assets/javascripts/jquery-ui/resizable.js +7 -7
  32. data/app/assets/javascripts/jquery-ui/selectable.js +3 -3
  33. data/app/assets/javascripts/jquery-ui/selectmenu.js +6 -7
  34. data/app/assets/javascripts/jquery-ui/slider.js +23 -5
  35. data/app/assets/javascripts/jquery-ui/sortable.js +24 -24
  36. data/app/assets/javascripts/jquery-ui/spinner.js +3 -3
  37. data/app/assets/javascripts/jquery-ui/tabs.js +6 -5
  38. data/app/assets/javascripts/jquery-ui/tooltip.js +3 -3
  39. data/app/assets/javascripts/jquery-ui/widget.js +8 -7
  40. data/app/assets/stylesheets/jquery-ui/accordion.css +2 -2
  41. data/app/assets/stylesheets/jquery-ui/all.css +2 -2
  42. data/app/assets/stylesheets/jquery-ui/autocomplete.css +2 -2
  43. data/app/assets/stylesheets/jquery-ui/base.css +2 -2
  44. data/app/assets/stylesheets/jquery-ui/button.css +2 -2
  45. data/app/assets/stylesheets/jquery-ui/core.css +2 -2
  46. data/app/assets/stylesheets/jquery-ui/datepicker.css +2 -2
  47. data/app/assets/stylesheets/jquery-ui/dialog.css +2 -2
  48. data/app/assets/stylesheets/jquery-ui/draggable.css +2 -2
  49. data/app/assets/stylesheets/jquery-ui/menu.css +2 -2
  50. data/app/assets/stylesheets/jquery-ui/progressbar.css +2 -2
  51. data/app/assets/stylesheets/jquery-ui/resizable.css +2 -2
  52. data/app/assets/stylesheets/jquery-ui/selectable.css +2 -2
  53. data/app/assets/stylesheets/jquery-ui/selectmenu.css +2 -2
  54. data/app/assets/stylesheets/jquery-ui/slider.css +2 -2
  55. data/app/assets/stylesheets/jquery-ui/sortable.css +2 -2
  56. data/app/assets/stylesheets/jquery-ui/spinner.css +2 -2
  57. data/app/assets/stylesheets/jquery-ui/tabs.css +2 -2
  58. data/app/assets/stylesheets/jquery-ui/theme.css.erb +2 -2
  59. data/app/assets/stylesheets/jquery-ui/tooltip.css +2 -2
  60. data/lib/jquery/ui/rails/version.rb +2 -2
  61. metadata +3 -3
@@ -1,10 +1,10 @@
1
1
  //= require jquery-ui/effect
2
2
 
3
3
  /*!
4
- * jQuery UI Effects Size 1.11.2
4
+ * jQuery UI Effects Size 1.11.3
5
5
  * http://jqueryui.com
6
6
  *
7
- * Copyright 2014 jQuery Foundation and other contributors
7
+ * Copyright jQuery Foundation and other contributors
8
8
  * Released under the MIT license.
9
9
  * http://jquery.org/license
10
10
  *
@@ -1,10 +1,10 @@
1
1
  //= require jquery-ui/effect
2
2
 
3
3
  /*!
4
- * jQuery UI Effects Slide 1.11.2
4
+ * jQuery UI Effects Slide 1.11.3
5
5
  * http://jqueryui.com
6
6
  *
7
- * Copyright 2014 jQuery Foundation and other contributors
7
+ * Copyright jQuery Foundation and other contributors
8
8
  * Released under the MIT license.
9
9
  * http://jquery.org/license
10
10
  *
@@ -1,10 +1,10 @@
1
1
  //= require jquery-ui/effect
2
2
 
3
3
  /*!
4
- * jQuery UI Effects Transfer 1.11.2
4
+ * jQuery UI Effects Transfer 1.11.3
5
5
  * http://jqueryui.com
6
6
  *
7
- * Copyright 2014 jQuery Foundation and other contributors
7
+ * Copyright jQuery Foundation and other contributors
8
8
  * Released under the MIT license.
9
9
  * http://jquery.org/license
10
10
  *
@@ -1,8 +1,8 @@
1
1
  /*!
2
- * jQuery UI Effects 1.11.2
2
+ * jQuery UI Effects 1.11.3
3
3
  * http://jqueryui.com
4
4
  *
5
- * Copyright 2014 jQuery Foundation and other contributors
5
+ * Copyright jQuery Foundation and other contributors
6
6
  * Released under the MIT license.
7
7
  * http://jquery.org/license
8
8
  *
@@ -904,7 +904,7 @@ $.fn.extend({
904
904
  (function() {
905
905
 
906
906
  $.extend( $.effects, {
907
- version: "1.11.2",
907
+ version: "1.11.3",
908
908
 
909
909
  // Saves a set of properties in a data storage
910
910
  save: function( element, set ) {
@@ -3,10 +3,10 @@
3
3
  //= require jquery-ui/position
4
4
 
5
5
  /*!
6
- * jQuery UI Menu 1.11.2
6
+ * jQuery UI Menu 1.11.3
7
7
  * http://jqueryui.com
8
8
  *
9
- * Copyright 2014 jQuery Foundation and other contributors
9
+ * Copyright jQuery Foundation and other contributors
10
10
  * Released under the MIT license.
11
11
  * http://jquery.org/license
12
12
  *
@@ -30,7 +30,7 @@
30
30
  }(function( $ ) {
31
31
 
32
32
  return $.widget( "ui.menu", {
33
- version: "1.11.2",
33
+ version: "1.11.3",
34
34
  defaultElement: "<ul>",
35
35
  delay: 300,
36
36
  options: {
@@ -2,10 +2,10 @@
2
2
  //= require jquery-ui/widget
3
3
 
4
4
  /*!
5
- * jQuery UI Mouse 1.11.2
5
+ * jQuery UI Mouse 1.11.3
6
6
  * http://jqueryui.com
7
7
  *
8
- * Copyright 2014 jQuery Foundation and other contributors
8
+ * Copyright jQuery Foundation and other contributors
9
9
  * Released under the MIT license.
10
10
  * http://jquery.org/license
11
11
  *
@@ -32,7 +32,7 @@ $( document ).mouseup( function() {
32
32
  });
33
33
 
34
34
  return $.widget("ui.mouse", {
35
- version: "1.11.2",
35
+ version: "1.11.3",
36
36
  options: {
37
37
  cancel: "input,textarea,button,select,option",
38
38
  distance: 1,
@@ -1,8 +1,8 @@
1
1
  /*!
2
- * jQuery UI Position 1.11.2
2
+ * jQuery UI Position 1.11.3
3
3
  * http://jqueryui.com
4
4
  *
5
- * Copyright 2014 jQuery Foundation and other contributors
5
+ * Copyright jQuery Foundation and other contributors
6
6
  * Released under the MIT license.
7
7
  * http://jquery.org/license
8
8
  *
@@ -448,12 +448,12 @@ $.ui.position = {
448
448
  newOverBottom;
449
449
  if ( overTop < 0 ) {
450
450
  newOverBottom = position.top + myOffset + atOffset + offset + data.collisionHeight - outerHeight - withinOffset;
451
- if ( ( position.top + myOffset + atOffset + offset) > overTop && ( newOverBottom < 0 || newOverBottom < abs( overTop ) ) ) {
451
+ if ( newOverBottom < 0 || newOverBottom < abs( overTop ) ) {
452
452
  position.top += myOffset + atOffset + offset;
453
453
  }
454
454
  } else if ( overBottom > 0 ) {
455
455
  newOverTop = position.top - data.collisionPosition.marginTop + myOffset + atOffset + offset - offsetTop;
456
- if ( ( position.top + myOffset + atOffset + offset) > overBottom && ( newOverTop > 0 || abs( newOverTop ) < overBottom ) ) {
456
+ if ( newOverTop > 0 || abs( newOverTop ) < overBottom ) {
457
457
  position.top += myOffset + atOffset + offset;
458
458
  }
459
459
  }
@@ -2,10 +2,10 @@
2
2
  //= require jquery-ui/widget
3
3
 
4
4
  /*!
5
- * jQuery UI Progressbar 1.11.2
5
+ * jQuery UI Progressbar 1.11.3
6
6
  * http://jqueryui.com
7
7
  *
8
- * Copyright 2014 jQuery Foundation and other contributors
8
+ * Copyright jQuery Foundation and other contributors
9
9
  * Released under the MIT license.
10
10
  * http://jquery.org/license
11
11
  *
@@ -28,7 +28,7 @@
28
28
  }(function( $ ) {
29
29
 
30
30
  return $.widget( "ui.progressbar", {
31
- version: "1.11.2",
31
+ version: "1.11.3",
32
32
  options: {
33
33
  max: 100,
34
34
  value: 0,
@@ -3,10 +3,10 @@
3
3
  //= require jquery-ui/mouse
4
4
 
5
5
  /*!
6
- * jQuery UI Resizable 1.11.2
6
+ * jQuery UI Resizable 1.11.3
7
7
  * http://jqueryui.com
8
8
  *
9
- * Copyright 2014 jQuery Foundation and other contributors
9
+ * Copyright jQuery Foundation and other contributors
10
10
  * Released under the MIT license.
11
11
  * http://jquery.org/license
12
12
  *
@@ -30,7 +30,7 @@
30
30
  }(function( $ ) {
31
31
 
32
32
  $.widget("ui.resizable", $.ui.mouse, {
33
- version: "1.11.2",
33
+ version: "1.11.3",
34
34
  widgetEventPrefix: "resize",
35
35
  options: {
36
36
  alsoResize: false,
@@ -103,7 +103,7 @@ $.widget("ui.resizable", $.ui.mouse, {
103
103
  });
104
104
 
105
105
  // Wrap the element if it cannot hold child nodes
106
- if (this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)) {
106
+ if (this.element[0].nodeName.match(/^(canvas|textarea|input|select|button|img)$/i)) {
107
107
 
108
108
  this.element.wrap(
109
109
  $("<div class='ui-wrapper' style='overflow: hidden;'></div>").css({
@@ -204,7 +204,7 @@ $.widget("ui.resizable", $.ui.mouse, {
204
204
  this.handles[i] = this.element.children( this.handles[ i ] ).first().show();
205
205
  }
206
206
 
207
- if (this.elementIsWrapper && this.originalElement[0].nodeName.match(/textarea|input|select|button/i)) {
207
+ if (this.elementIsWrapper && this.originalElement[0].nodeName.match(/^(textarea|input|select|button)$/i)) {
208
208
 
209
209
  axis = $(this.handles[i], this.element);
210
210
 
@@ -947,7 +947,7 @@ $.ui.plugin.add( "resizable", "containment", {
947
947
  }
948
948
  }
949
949
 
950
- if ( !continueResize ){
950
+ if ( !continueResize ) {
951
951
  that.position.left = that.prevPosition.left;
952
952
  that.position.top = that.prevPosition.top;
953
953
  that.size.width = that.prevSize.width;
@@ -1169,7 +1169,7 @@ $.ui.plugin.add("resizable", "grid", {
1169
1169
  that.size.width = newWidth;
1170
1170
  that.position.left = op.left - ox;
1171
1171
  } else {
1172
- newWidth = gridY - outerDimensions.height;
1172
+ newWidth = gridX - outerDimensions.width;
1173
1173
  that.size.width = newWidth;
1174
1174
  that.position.left = op.left + os.width - newWidth;
1175
1175
  }
@@ -3,10 +3,10 @@
3
3
  //= require jquery-ui/mouse
4
4
 
5
5
  /*!
6
- * jQuery UI Selectable 1.11.2
6
+ * jQuery UI Selectable 1.11.3
7
7
  * http://jqueryui.com
8
8
  *
9
- * Copyright 2014 jQuery Foundation and other contributors
9
+ * Copyright jQuery Foundation and other contributors
10
10
  * Released under the MIT license.
11
11
  * http://jquery.org/license
12
12
  *
@@ -30,7 +30,7 @@
30
30
  }(function( $ ) {
31
31
 
32
32
  return $.widget("ui.selectable", $.ui.mouse, {
33
- version: "1.11.2",
33
+ version: "1.11.3",
34
34
  options: {
35
35
  appendTo: "body",
36
36
  autoRefresh: true,
@@ -4,10 +4,10 @@
4
4
  //= require jquery-ui/menu
5
5
 
6
6
  /*!
7
- * jQuery UI Selectmenu 1.11.2
7
+ * jQuery UI Selectmenu 1.11.3
8
8
  * http://jqueryui.com
9
9
  *
10
- * Copyright 2014 jQuery Foundation and other contributors
10
+ * Copyright jQuery Foundation and other contributors
11
11
  * Released under the MIT license.
12
12
  * http://jquery.org/license
13
13
  *
@@ -32,7 +32,7 @@
32
32
  }(function( $ ) {
33
33
 
34
34
  return $.widget( "ui.selectmenu", {
35
- version: "1.11.2",
35
+ version: "1.11.3",
36
36
  defaultElement: "<select>",
37
37
  options: {
38
38
  appendTo: null,
@@ -72,8 +72,7 @@ return $.widget( "ui.selectmenu", {
72
72
  },
73
73
 
74
74
  _drawButton: function() {
75
- var that = this,
76
- tabindex = this.element.attr( "tabindex" );
75
+ var that = this;
77
76
 
78
77
  // Associate existing label with the new button
79
78
  this.label = $( "label[for='" + this.ids.element + "']" ).attr( "for", this.ids.button );
@@ -90,7 +89,7 @@ return $.widget( "ui.selectmenu", {
90
89
  // Create button
91
90
  this.button = $( "<span>", {
92
91
  "class": "ui-selectmenu-button ui-widget ui-state-default ui-corner-all",
93
- tabindex: tabindex || this.options.disabled ? -1 : 0,
92
+ tabindex: this.options.disabled ? -1 : 0,
94
93
  id: this.ids.button,
95
94
  role: "combobox",
96
95
  "aria-expanded": "false",
@@ -600,7 +599,7 @@ return $.widget( "ui.selectmenu", {
600
599
  data.push({
601
600
  element: option,
602
601
  index: index,
603
- value: option.attr( "value" ),
602
+ value: option.val(),
604
603
  label: option.text(),
605
604
  optgroup: optgroup.attr( "label" ) || "",
606
605
  disabled: optgroup.prop( "disabled" ) || option.prop( "disabled" )
@@ -3,10 +3,10 @@
3
3
  //= require jquery-ui/mouse
4
4
 
5
5
  /*!
6
- * jQuery UI Slider 1.11.2
6
+ * jQuery UI Slider 1.11.3
7
7
  * http://jqueryui.com
8
8
  *
9
- * Copyright 2014 jQuery Foundation and other contributors
9
+ * Copyright jQuery Foundation and other contributors
10
10
  * Released under the MIT license.
11
11
  * http://jquery.org/license
12
12
  *
@@ -30,7 +30,7 @@
30
30
  }(function( $ ) {
31
31
 
32
32
  return $.widget( "ui.slider", $.ui.mouse, {
33
- version: "1.11.2",
33
+ version: "1.11.3",
34
34
  widgetEventPrefix: "slide",
35
35
 
36
36
  options: {
@@ -551,8 +551,26 @@ return $.widget( "ui.slider", $.ui.mouse, {
551
551
  },
552
552
 
553
553
  _calculateNewMax: function() {
554
- var remainder = ( this.options.max - this._valueMin() ) % this.options.step;
555
- this.max = this.options.max - remainder;
554
+ var max = this.options.max,
555
+ min = this._valueMin(),
556
+ step = this.options.step,
557
+ aboveMin = Math.floor( ( max - min ) / step ) * step;
558
+ max = aboveMin + min;
559
+ this.max = parseFloat( max.toFixed( this._precision() ) );
560
+ },
561
+
562
+ _precision: function() {
563
+ var precision = this._precisionOf( this.options.step );
564
+ if ( this.options.min !== null ) {
565
+ precision = Math.max( precision, this._precisionOf( this.options.min ) );
566
+ }
567
+ return precision;
568
+ },
569
+
570
+ _precisionOf: function( num ) {
571
+ var str = num.toString(),
572
+ decimal = str.indexOf( "." );
573
+ return decimal === -1 ? 0 : str.length - decimal - 1;
556
574
  },
557
575
 
558
576
  _valueMin: function() {
@@ -3,10 +3,10 @@
3
3
  //= require jquery-ui/mouse
4
4
 
5
5
  /*!
6
- * jQuery UI Sortable 1.11.2
6
+ * jQuery UI Sortable 1.11.3
7
7
  * http://jqueryui.com
8
8
  *
9
- * Copyright 2014 jQuery Foundation and other contributors
9
+ * Copyright jQuery Foundation and other contributors
10
10
  * Released under the MIT license.
11
11
  * http://jquery.org/license
12
12
  *
@@ -30,7 +30,7 @@
30
30
  }(function( $ ) {
31
31
 
32
32
  return $.widget("ui.sortable", $.ui.mouse, {
33
- version: "1.11.2",
33
+ version: "1.11.3",
34
34
  widgetEventPrefix: "sort",
35
35
  ready: false,
36
36
  options: {
@@ -280,7 +280,7 @@ return $.widget("ui.sortable", $.ui.mouse, {
280
280
  }
281
281
 
282
282
  //Prepare scrolling
283
- if(this.scrollParent[0] !== document && this.scrollParent[0].tagName !== "HTML") {
283
+ if(this.scrollParent[0] !== this.document[0] && this.scrollParent[0].tagName !== "HTML") {
284
284
  this.overflowOffset = this.scrollParent.offset();
285
285
  }
286
286
 
@@ -332,7 +332,7 @@ return $.widget("ui.sortable", $.ui.mouse, {
332
332
 
333
333
  //Do scrolling
334
334
  if(this.options.scroll) {
335
- if(this.scrollParent[0] !== document && this.scrollParent[0].tagName !== "HTML") {
335
+ if(this.scrollParent[0] !== this.document[0] && this.scrollParent[0].tagName !== "HTML") {
336
336
 
337
337
  if((this.overflowOffset.top + this.scrollParent[0].offsetHeight) - event.pageY < o.scrollSensitivity) {
338
338
  this.scrollParent[0].scrollTop = scrolled = this.scrollParent[0].scrollTop + o.scrollSpeed;
@@ -348,16 +348,16 @@ return $.widget("ui.sortable", $.ui.mouse, {
348
348
 
349
349
  } else {
350
350
 
351
- if(event.pageY - $(document).scrollTop() < o.scrollSensitivity) {
352
- scrolled = $(document).scrollTop($(document).scrollTop() - o.scrollSpeed);
353
- } else if($(window).height() - (event.pageY - $(document).scrollTop()) < o.scrollSensitivity) {
354
- scrolled = $(document).scrollTop($(document).scrollTop() + o.scrollSpeed);
351
+ if(event.pageY - this.document.scrollTop() < o.scrollSensitivity) {
352
+ scrolled = this.document.scrollTop(this.document.scrollTop() - o.scrollSpeed);
353
+ } else if(this.window.height() - (event.pageY - this.document.scrollTop()) < o.scrollSensitivity) {
354
+ scrolled = this.document.scrollTop(this.document.scrollTop() + o.scrollSpeed);
355
355
  }
356
356
 
357
- if(event.pageX - $(document).scrollLeft() < o.scrollSensitivity) {
358
- scrolled = $(document).scrollLeft($(document).scrollLeft() - o.scrollSpeed);
359
- } else if($(window).width() - (event.pageX - $(document).scrollLeft()) < o.scrollSensitivity) {
360
- scrolled = $(document).scrollLeft($(document).scrollLeft() + o.scrollSpeed);
357
+ if(event.pageX - this.document.scrollLeft() < o.scrollSensitivity) {
358
+ scrolled = this.document.scrollLeft(this.document.scrollLeft() - o.scrollSpeed);
359
+ } else if(this.window.width() - (event.pageX - this.document.scrollLeft()) < o.scrollSensitivity) {
360
+ scrolled = this.document.scrollLeft(this.document.scrollLeft() + o.scrollSpeed);
361
361
  }
362
362
 
363
363
  }
@@ -456,10 +456,10 @@ return $.widget("ui.sortable", $.ui.mouse, {
456
456
  animation = {};
457
457
 
458
458
  if ( !axis || axis === "x" ) {
459
- animation.left = cur.left - this.offset.parent.left - this.margins.left + (this.offsetParent[0] === document.body ? 0 : this.offsetParent[0].scrollLeft);
459
+ animation.left = cur.left - this.offset.parent.left - this.margins.left + (this.offsetParent[0] === this.document[0].body ? 0 : this.offsetParent[0].scrollLeft);
460
460
  }
461
461
  if ( !axis || axis === "y" ) {
462
- animation.top = cur.top - this.offset.parent.top - this.margins.top + (this.offsetParent[0] === document.body ? 0 : this.offsetParent[0].scrollTop);
462
+ animation.top = cur.top - this.offset.parent.top - this.margins.top + (this.offsetParent[0] === this.document[0].body ? 0 : this.offsetParent[0].scrollTop);
463
463
  }
464
464
  this.reverting = true;
465
465
  $(this.helper).animate( animation, parseInt(this.options.revert, 10) || 500, function() {
@@ -652,7 +652,7 @@ return $.widget("ui.sortable", $.ui.mouse, {
652
652
 
653
653
  if(connectWith && connected) {
654
654
  for (i = connectWith.length - 1; i >= 0; i--){
655
- cur = $(connectWith[i]);
655
+ cur = $(connectWith[i], this.document[0]);
656
656
  for ( j = cur.length - 1; j >= 0; j--){
657
657
  inst = $.data(cur[j], this.widgetFullName);
658
658
  if(inst && inst !== this && !inst.options.disabled) {
@@ -702,7 +702,7 @@ return $.widget("ui.sortable", $.ui.mouse, {
702
702
 
703
703
  if(connectWith && this.ready) { //Shouldn't be run the first time through due to massive slow-down
704
704
  for (i = connectWith.length - 1; i >= 0; i--){
705
- cur = $(connectWith[i]);
705
+ cur = $(connectWith[i], this.document[0]);
706
706
  for (j = cur.length - 1; j >= 0; j--){
707
707
  inst = $.data(cur[j], this.widgetFullName);
708
708
  if(inst && inst !== this && !inst.options.disabled) {
@@ -994,14 +994,14 @@ return $.widget("ui.sortable", $.ui.mouse, {
994
994
  // 1. The position of the helper is absolute, so it's position is calculated based on the next positioned parent
995
995
  // 2. The actual offset parent is a child of the scroll parent, and the scroll parent isn't the document, which means that
996
996
  // the scroll is included in the initial calculation of the offset of the parent, and never recalculated upon drag
997
- if(this.cssPosition === "absolute" && this.scrollParent[0] !== document && $.contains(this.scrollParent[0], this.offsetParent[0])) {
997
+ if(this.cssPosition === "absolute" && this.scrollParent[0] !== this.document[0] && $.contains(this.scrollParent[0], this.offsetParent[0])) {
998
998
  po.left += this.scrollParent.scrollLeft();
999
999
  po.top += this.scrollParent.scrollTop();
1000
1000
  }
1001
1001
 
1002
1002
  // This needs to be actually done for all browsers, since pageX/pageY includes this information
1003
1003
  // with an ugly IE fix
1004
- if( this.offsetParent[0] === document.body || (this.offsetParent[0].tagName && this.offsetParent[0].tagName.toLowerCase() === "html" && $.ui.ie)) {
1004
+ if( this.offsetParent[0] === this.document[0].body || (this.offsetParent[0].tagName && this.offsetParent[0].tagName.toLowerCase() === "html" && $.ui.ie)) {
1005
1005
  po = { top: 0, left: 0 };
1006
1006
  }
1007
1007
 
@@ -1051,8 +1051,8 @@ return $.widget("ui.sortable", $.ui.mouse, {
1051
1051
  this.containment = [
1052
1052
  0 - this.offset.relative.left - this.offset.parent.left,
1053
1053
  0 - this.offset.relative.top - this.offset.parent.top,
1054
- $(o.containment === "document" ? document : window).width() - this.helperProportions.width - this.margins.left,
1055
- ($(o.containment === "document" ? document : window).height() || document.body.parentNode.scrollHeight) - this.helperProportions.height - this.margins.top
1054
+ o.containment === "document" ? this.document.width() : this.window.width() - this.helperProportions.width - this.margins.left,
1055
+ (o.containment === "document" ? this.document.width() : this.window.height() || this.document[0].body.parentNode.scrollHeight) - this.helperProportions.height - this.margins.top
1056
1056
  ];
1057
1057
  }
1058
1058
 
@@ -1077,7 +1077,7 @@ return $.widget("ui.sortable", $.ui.mouse, {
1077
1077
  pos = this.position;
1078
1078
  }
1079
1079
  var mod = d === "absolute" ? 1 : -1,
1080
- scroll = this.cssPosition === "absolute" && !(this.scrollParent[0] !== document && $.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent,
1080
+ scroll = this.cssPosition === "absolute" && !(this.scrollParent[0] !== this.document[0] && $.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent,
1081
1081
  scrollIsRootNode = (/(html|body)/i).test(scroll[0].tagName);
1082
1082
 
1083
1083
  return {
@@ -1103,13 +1103,13 @@ return $.widget("ui.sortable", $.ui.mouse, {
1103
1103
  o = this.options,
1104
1104
  pageX = event.pageX,
1105
1105
  pageY = event.pageY,
1106
- scroll = this.cssPosition === "absolute" && !(this.scrollParent[0] !== document && $.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent, scrollIsRootNode = (/(html|body)/i).test(scroll[0].tagName);
1106
+ scroll = this.cssPosition === "absolute" && !(this.scrollParent[0] !== this.document[0] && $.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent, scrollIsRootNode = (/(html|body)/i).test(scroll[0].tagName);
1107
1107
 
1108
1108
  // This is another very weird special case that only happens for relative elements:
1109
1109
  // 1. If the css position is relative
1110
1110
  // 2. and the scroll parent is the document or similar to the offset parent
1111
1111
  // we have to refresh the relative offset during the scroll so there are no jumps
1112
- if(this.cssPosition === "relative" && !(this.scrollParent[0] !== document && this.scrollParent[0] !== this.offsetParent[0])) {
1112
+ if(this.cssPosition === "relative" && !(this.scrollParent[0] !== this.document[0] && this.scrollParent[0] !== this.offsetParent[0])) {
1113
1113
  this.offset.relative = this._getRelativeOffset();
1114
1114
  }
1115
1115