activeadmin 3.3.0 → 3.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +20 -0
  3. data/app/assets/javascripts/active_admin/base.js +8 -11
  4. data/app/javascript/active_admin/initializers/datepicker.js +3 -0
  5. data/lib/active_admin/dependency.rb +1 -1
  6. data/lib/active_admin/resource.rb +8 -2
  7. data/lib/active_admin/router.rb +5 -5
  8. data/lib/active_admin/version.rb +1 -1
  9. data/vendor/assets/javascripts/jquery-ui/data.js +6 -12
  10. data/vendor/assets/javascripts/jquery-ui/disable-selection.js +1 -1
  11. data/vendor/assets/javascripts/jquery-ui/focusable.js +3 -13
  12. data/vendor/assets/javascripts/jquery-ui/form-reset-mixin.js +2 -4
  13. data/vendor/assets/javascripts/jquery-ui/keycode.js +1 -1
  14. data/vendor/assets/javascripts/jquery-ui/labels.js +4 -5
  15. data/vendor/assets/javascripts/jquery-ui/position.js +1 -1
  16. data/vendor/assets/javascripts/jquery-ui/scroll-parent.js +1 -1
  17. data/vendor/assets/javascripts/jquery-ui/tabbable.js +1 -1
  18. data/vendor/assets/javascripts/jquery-ui/unique-id.js +1 -1
  19. data/vendor/assets/javascripts/jquery-ui/version.js +1 -1
  20. data/vendor/assets/javascripts/jquery-ui/widget.js +4 -1
  21. data/vendor/assets/javascripts/jquery-ui/widgets/button.js +6 -6
  22. data/vendor/assets/javascripts/jquery-ui/widgets/checkboxradio.js +4 -4
  23. data/vendor/assets/javascripts/jquery-ui/widgets/controlgroup.js +2 -2
  24. data/vendor/assets/javascripts/jquery-ui/widgets/datepicker.js +11 -14
  25. data/vendor/assets/javascripts/jquery-ui/widgets/dialog.js +20 -34
  26. data/vendor/assets/javascripts/jquery-ui/widgets/draggable.js +4 -8
  27. data/vendor/assets/javascripts/jquery-ui/widgets/mouse.js +16 -31
  28. data/vendor/assets/javascripts/jquery-ui/widgets/resizable.js +73 -20
  29. data/vendor/assets/javascripts/jquery-ui/widgets/sortable.js +9 -17
  30. data/vendor/assets/javascripts/jquery-ui/widgets/tabs.js +53 -66
  31. metadata +4 -11
  32. data/vendor/assets/javascripts/jquery-ui/form.js +0 -25
  33. data/vendor/assets/javascripts/jquery-ui/ie.js +0 -20
  34. data/vendor/assets/javascripts/jquery-ui/safe-active-element.js +0 -46
  35. data/vendor/assets/javascripts/jquery-ui/safe-blur.js +0 -27
@@ -5,15 +5,13 @@
5
5
  //= require jquery-ui/focusable
6
6
  //= require jquery-ui/keycode
7
7
  //= require jquery-ui/position
8
- //= require jquery-ui/safe-active-element
9
- //= require jquery-ui/safe-blur
10
8
  //= require jquery-ui/tabbable
11
9
  //= require jquery-ui/unique-id
12
10
  //= require jquery-ui/version
13
11
  //= require jquery-ui/widget
14
12
 
15
13
  /*!
16
- * jQuery UI Dialog 1.13.3
14
+ * jQuery UI Dialog 1.14.2
17
15
  * https://jqueryui.com
18
16
  *
19
17
  * Copyright OpenJS Foundation and other contributors
@@ -45,8 +43,6 @@
45
43
  "../focusable",
46
44
  "../keycode",
47
45
  "../position",
48
- "../safe-active-element",
49
- "../safe-blur",
50
46
  "../tabbable",
51
47
  "../unique-id",
52
48
  "../version",
@@ -61,7 +57,7 @@
61
57
  "use strict";
62
58
 
63
59
  $.widget( "ui.dialog", {
64
- version: "1.13.3",
60
+ version: "1.14.2",
65
61
  options: {
66
62
  appendTo: "body",
67
63
  autoOpen: true,
@@ -97,6 +93,7 @@ $.widget( "ui.dialog", {
97
93
  resizable: true,
98
94
  show: null,
99
95
  title: null,
96
+ uiDialogTitleHeadingLevel: 0,
100
97
  width: 300,
101
98
 
102
99
  // Callbacks
@@ -243,7 +240,7 @@ $.widget( "ui.dialog", {
243
240
  // Hiding a focused element doesn't trigger blur in WebKit
244
241
  // so in case we have nothing to focus on, explicitly blur the active element
245
242
  // https://bugs.webkit.org/show_bug.cgi?id=47182
246
- $.ui.safeBlur( $.ui.safeActiveElement( this.document[ 0 ] ) );
243
+ $( this.document[ 0 ].activeElement ).trigger( "blur" );
247
244
  }
248
245
 
249
246
  this._hide( this.uiDialog, this.options.hide, function() {
@@ -287,7 +284,7 @@ $.widget( "ui.dialog", {
287
284
  }
288
285
 
289
286
  this._isOpen = true;
290
- this.opener = $( $.ui.safeActiveElement( this.document[ 0 ] ) );
287
+ this.opener = $( this.document[ 0 ].activeElement );
291
288
 
292
289
  this._size();
293
290
  this._position();
@@ -343,7 +340,7 @@ $.widget( "ui.dialog", {
343
340
  },
344
341
 
345
342
  _restoreTabbableFocus: function() {
346
- var activeElement = $.ui.safeActiveElement( this.document[ 0 ] ),
343
+ var activeElement = this.document[ 0 ].activeElement,
347
344
  isActive = this.uiDialog[ 0 ] === activeElement ||
348
345
  $.contains( this.uiDialog[ 0 ], activeElement );
349
346
  if ( !isActive ) {
@@ -354,11 +351,6 @@ $.widget( "ui.dialog", {
354
351
  _keepFocus: function( event ) {
355
352
  event.preventDefault();
356
353
  this._restoreTabbableFocus();
357
-
358
- // support: IE
359
- // IE <= 8 doesn't prevent moving focus even with event.preventDefault()
360
- // so we check again later
361
- this._delay( this._restoreTabbableFocus );
362
354
  },
363
355
 
364
356
  _createWrapper: function() {
@@ -368,7 +360,8 @@ $.widget( "ui.dialog", {
368
360
 
369
361
  // Setting tabIndex makes the div focusable
370
362
  tabIndex: -1,
371
- role: "dialog"
363
+ role: "dialog",
364
+ "aria-modal": this.options.modal ? "true" : null
372
365
  } )
373
366
  .appendTo( this._appendTo() );
374
367
 
@@ -441,9 +434,6 @@ $.widget( "ui.dialog", {
441
434
  }
442
435
  } );
443
436
 
444
- // Support: IE
445
- // Use type="button" to prevent enter keypresses in textboxes from closing the
446
- // dialog in IE (#9312)
447
437
  this.uiDialogTitlebarClose = $( "<button type='button'></button>" )
448
438
  .button( {
449
439
  label: $( "<a>" ).text( this.options.closeText ).html(),
@@ -460,7 +450,13 @@ $.widget( "ui.dialog", {
460
450
  }
461
451
  } );
462
452
 
463
- uiDialogTitle = $( "<span>" ).uniqueId().prependTo( this.uiDialogTitlebar );
453
+ var uiDialogHeadingLevel = Number.isInteger( this.options.uiDialogTitleHeadingLevel ) &&
454
+ this.options.uiDialogTitleHeadingLevel > 0 &&
455
+ this.options.uiDialogTitleHeadingLevel <= 6 ?
456
+ "h" + this.options.uiDialogTitleHeadingLevel : "span";
457
+
458
+ uiDialogTitle = $( "<" + uiDialogHeadingLevel + ">" )
459
+ .uniqueId().prependTo( this.uiDialogTitlebar );
464
460
  this._addClass( uiDialogTitle, "ui-dialog-title" );
465
461
  this._title( uiDialogTitle );
466
462
 
@@ -786,6 +782,10 @@ $.widget( "ui.dialog", {
786
782
  if ( key === "title" ) {
787
783
  this._title( this.uiDialogTitlebar.find( ".ui-dialog-title" ) );
788
784
  }
785
+
786
+ if ( key === "modal" ) {
787
+ uiDialog.attr( "aria-modal", value ? "true" : null );
788
+ }
789
789
  },
790
790
 
791
791
  _size: function() {
@@ -871,8 +871,6 @@ $.widget( "ui.dialog", {
871
871
  return;
872
872
  }
873
873
 
874
- var jqMinor = $.fn.jquery.substring( 0, 4 );
875
-
876
874
  // We use a delay in case the overlay is created from an
877
875
  // event that we're going to be cancelling (#2804)
878
876
  var isOpening = true;
@@ -894,18 +892,6 @@ $.widget( "ui.dialog", {
894
892
  if ( !instance._allowInteraction( event ) ) {
895
893
  event.preventDefault();
896
894
  instance._focusTabbable();
897
-
898
- // Support: jQuery >=3.4 <3.7 only
899
- // In jQuery 3.4-3.6, there are multiple issues with focus/blur
900
- // trigger chains or when triggering is done on a hidden element
901
- // at least once.
902
- // Trigger focus in a delay in addition if needed to avoid the issues.
903
- // See https://github.com/jquery/jquery/issues/4382
904
- // See https://github.com/jquery/jquery/issues/4856
905
- // See https://github.com/jquery/jquery/issues/4950
906
- if ( jqMinor === "3.4." || jqMinor === "3.5." || jqMinor === "3.6." ) {
907
- instance._delay( instance._restoreTabbableFocus );
908
- }
909
895
  }
910
896
  }.bind( this ) );
911
897
  }
@@ -944,7 +930,7 @@ $.widget( "ui.dialog", {
944
930
 
945
931
  // DEPRECATED
946
932
  // TODO: switch return back to widget declaration at top of file when this is removed
947
- if ( $.uiBackCompat !== false ) {
933
+ if ( $.uiBackCompat === true ) {
948
934
 
949
935
  // Backcompat for dialogClass option
950
936
  $.widget( "ui.dialog", $.ui.dialog, {
@@ -1,14 +1,12 @@
1
1
  //= require jquery-ui/widgets/mouse
2
2
  //= require jquery-ui/data
3
3
  //= require jquery-ui/plugin
4
- //= require jquery-ui/safe-active-element
5
- //= require jquery-ui/safe-blur
6
4
  //= require jquery-ui/scroll-parent
7
5
  //= require jquery-ui/version
8
6
  //= require jquery-ui/widget
9
7
 
10
8
  /*!
11
- * jQuery UI Draggable 1.13.3
9
+ * jQuery UI Draggable 1.14.2
12
10
  * https://jqueryui.com
13
11
  *
14
12
  * Copyright OpenJS Foundation and other contributors
@@ -34,8 +32,6 @@
34
32
  "./mouse",
35
33
  "../data",
36
34
  "../plugin",
37
- "../safe-active-element",
38
- "../safe-blur",
39
35
  "../scroll-parent",
40
36
  "../version",
41
37
  "../widget"
@@ -49,7 +45,7 @@
49
45
  "use strict";
50
46
 
51
47
  $.widget( "ui.draggable", $.ui.mouse, {
52
- version: "1.13.3",
48
+ version: "1.14.2",
53
49
  widgetEventPrefix: "drag",
54
50
  options: {
55
51
  addClasses: true,
@@ -156,7 +152,7 @@ $.widget( "ui.draggable", $.ui.mouse, {
156
152
  },
157
153
 
158
154
  _blurActiveElement: function( event ) {
159
- var activeElement = $.ui.safeActiveElement( this.document[ 0 ] ),
155
+ var activeElement = this.document[ 0 ].activeElement,
160
156
  target = $( event.target );
161
157
 
162
158
  // Don't blur if the event occurred on an element that is within
@@ -167,7 +163,7 @@ $.widget( "ui.draggable", $.ui.mouse, {
167
163
  }
168
164
 
169
165
  // Blur any element that currently has focus, see #4261
170
- $.ui.safeBlur( activeElement );
166
+ $( activeElement ).trigger( "blur" );
171
167
  },
172
168
 
173
169
  _mouseStart: function( event ) {
@@ -1,9 +1,8 @@
1
- //= require jquery-ui/ie
2
1
  //= require jquery-ui/version
3
2
  //= require jquery-ui/widget
4
3
 
5
4
  /*!
6
- * jQuery UI Mouse 1.13.3
5
+ * jQuery UI Mouse 1.14.2
7
6
  * https://jqueryui.com
8
7
  *
9
8
  * Copyright OpenJS Foundation and other contributors
@@ -24,7 +23,6 @@
24
23
  // AMD. Register as an anonymous module.
25
24
  define( [
26
25
  "jquery",
27
- "../ie",
28
26
  "../version",
29
27
  "../widget"
30
28
  ], factory );
@@ -42,7 +40,7 @@ $( document ).on( "mouseup", function() {
42
40
  } );
43
41
 
44
42
  return $.widget( "ui.mouse", {
45
- version: "1.13.3",
43
+ version: "1.14.2",
46
44
  options: {
47
45
  cancel: "input, textarea, button, select, option",
48
46
  distance: 1,
@@ -94,12 +92,10 @@ return $.widget( "ui.mouse", {
94
92
  this._mouseDownEvent = event;
95
93
 
96
94
  var that = this,
97
- btnIsLeft = ( event.which === 1 ),
98
-
99
- // event.target.nodeName works around a bug in IE 8 with
100
- // disabled inputs (#7620)
101
- elIsCancel = ( typeof this.options.cancel === "string" && event.target.nodeName ?
102
- $( event.target ).closest( this.options.cancel ).length : false );
95
+ btnIsLeft = event.which === 1,
96
+ elIsCancel = typeof this.options.cancel === "string" ?
97
+ $( event.target ).closest( this.options.cancel ).length :
98
+ false;
103
99
  if ( !btnIsLeft || elIsCancel || !this._mouseCapture( event ) ) {
104
100
  return true;
105
101
  }
@@ -145,28 +141,17 @@ return $.widget( "ui.mouse", {
145
141
  _mouseMove: function( event ) {
146
142
 
147
143
  // Only check for mouseups outside the document if you've moved inside the document
148
- // at least once. This prevents the firing of mouseup in the case of IE<9, which will
149
- // fire a mousemove event if content is placed under the cursor. See #7778
150
- // Support: IE <9
151
- if ( this._mouseMoved ) {
152
-
153
- // IE mouseup check - mouseup happened when mouse was out of window
154
- if ( $.ui.ie && ( !document.documentMode || document.documentMode < 9 ) &&
155
- !event.button ) {
144
+ // at least once.
145
+ if ( this._mouseMoved && !event.which ) {
146
+
147
+ // Support: Safari <=8 - 9
148
+ // Safari sets which to 0 if you press any of the following keys
149
+ // during a drag (#14461)
150
+ if ( event.originalEvent.altKey || event.originalEvent.ctrlKey ||
151
+ event.originalEvent.metaKey || event.originalEvent.shiftKey ) {
152
+ this.ignoreMissingWhich = true;
153
+ } else if ( !this.ignoreMissingWhich ) {
156
154
  return this._mouseUp( event );
157
-
158
- // Iframe mouseup check - mouseup occurred in another document
159
- } else if ( !event.which ) {
160
-
161
- // Support: Safari <=8 - 9
162
- // Safari sets which to 0 if you press any of the following keys
163
- // during a drag (#14461)
164
- if ( event.originalEvent.altKey || event.originalEvent.ctrlKey ||
165
- event.originalEvent.metaKey || event.originalEvent.shiftKey ) {
166
- this.ignoreMissingWhich = true;
167
- } else if ( !this.ignoreMissingWhich ) {
168
- return this._mouseUp( event );
169
- }
170
155
  }
171
156
  }
172
157
 
@@ -5,7 +5,7 @@
5
5
  //= require jquery-ui/widget
6
6
 
7
7
  /*!
8
- * jQuery UI Resizable 1.13.3
8
+ * jQuery UI Resizable 1.14.2
9
9
  * https://jqueryui.com
10
10
  *
11
11
  * Copyright OpenJS Foundation and other contributors
@@ -45,7 +45,7 @@
45
45
  "use strict";
46
46
 
47
47
  $.widget( "ui.resizable", $.ui.mouse, {
48
- version: "1.13.3",
48
+ version: "1.14.2",
49
49
  widgetEventPrefix: "resize",
50
50
  options: {
51
51
  alsoResize: false,
@@ -86,12 +86,18 @@ $.widget( "ui.resizable", $.ui.mouse, {
86
86
 
87
87
  _hasScroll: function( el, a ) {
88
88
 
89
- if ( $( el ).css( "overflow" ) === "hidden" ) {
89
+ var scroll,
90
+ has = false,
91
+ overflow = $( el ).css( "overflow" );
92
+
93
+ if ( overflow === "hidden" ) {
90
94
  return false;
91
95
  }
96
+ if ( overflow === "scroll" ) {
97
+ return true;
98
+ }
92
99
 
93
- var scroll = ( a && a === "left" ) ? "scrollLeft" : "scrollTop",
94
- has = false;
100
+ scroll = ( a && a === "left" ) ? "scrollLeft" : "scrollTop";
95
101
 
96
102
  if ( el[ scroll ] > 0 ) {
97
103
  return true;
@@ -104,7 +110,7 @@ $.widget( "ui.resizable", $.ui.mouse, {
104
110
  el[ scroll ] = 1;
105
111
  has = ( el[ scroll ] > 0 );
106
112
  el[ scroll ] = 0;
107
- } catch ( e ) {
113
+ } catch ( _e ) {
108
114
 
109
115
  // `el` might be a string, then setting `scroll` will throw
110
116
  // an error in strict mode; ignore it.
@@ -155,9 +161,8 @@ $.widget( "ui.resizable", $.ui.mouse, {
155
161
  };
156
162
 
157
163
  this.element.css( margins );
158
- this.originalElement.css( "margin", 0 );
159
164
 
160
- // support: Safari
165
+ // Support: Safari
161
166
  // Prevent Safari textarea resize
162
167
  this.originalResizeStyle = this.originalElement.css( "resize" );
163
168
  this.originalElement.css( "resize", "none" );
@@ -168,10 +173,6 @@ $.widget( "ui.resizable", $.ui.mouse, {
168
173
  display: "block"
169
174
  } ) );
170
175
 
171
- // Support: IE9
172
- // avoid IE jump (hard set the margin)
173
- this.originalElement.css( margins );
174
-
175
176
  this._proportionallyResize();
176
177
  }
177
178
 
@@ -373,7 +374,7 @@ $.widget( "ui.resizable", $.ui.mouse, {
373
374
 
374
375
  _mouseStart: function( event ) {
375
376
 
376
- var curleft, curtop, cursor,
377
+ var curleft, curtop, cursor, calculatedSize,
377
378
  o = this.options,
378
379
  el = this.element;
379
380
 
@@ -392,20 +393,24 @@ $.widget( "ui.resizable", $.ui.mouse, {
392
393
  this.offset = this.helper.offset();
393
394
  this.position = { left: curleft, top: curtop };
394
395
 
396
+ if ( !this._helper ) {
397
+ calculatedSize = this._calculateAdjustedElementDimensions( el );
398
+ }
399
+
395
400
  this.size = this._helper ? {
396
401
  width: this.helper.width(),
397
402
  height: this.helper.height()
398
403
  } : {
399
- width: el.width(),
400
- height: el.height()
404
+ width: calculatedSize.width,
405
+ height: calculatedSize.height
401
406
  };
402
407
 
403
408
  this.originalSize = this._helper ? {
404
409
  width: el.outerWidth(),
405
410
  height: el.outerHeight()
406
411
  } : {
407
- width: el.width(),
408
- height: el.height()
412
+ width: calculatedSize.width,
413
+ height: calculatedSize.height
409
414
  };
410
415
 
411
416
  this.sizeDiff = {
@@ -701,6 +706,52 @@ $.widget( "ui.resizable", $.ui.mouse, {
701
706
  };
702
707
  },
703
708
 
709
+ _calculateAdjustedElementDimensions: function( element ) {
710
+ var elWidth, elHeight, paddingBorder,
711
+ ce = element.get( 0 );
712
+
713
+ if ( element.css( "box-sizing" ) !== "content-box" ||
714
+ ( !this._hasScroll( ce ) && !this._hasScroll( ce, "left" ) ) ) {
715
+ return {
716
+ height: parseFloat( element.css( "height" ) ),
717
+ width: parseFloat( element.css( "width" ) )
718
+ };
719
+ }
720
+
721
+ // Check if CSS inline styles are set and use those (usually from previous resizes)
722
+ elWidth = parseFloat( ce.style.width );
723
+ elHeight = parseFloat( ce.style.height );
724
+
725
+ paddingBorder = this._getPaddingPlusBorderDimensions( element );
726
+ elWidth = isNaN( elWidth ) ?
727
+ this._getElementTheoreticalSize( element, paddingBorder, "width" ) :
728
+ elWidth;
729
+ elHeight = isNaN( elHeight ) ?
730
+ this._getElementTheoreticalSize( element, paddingBorder, "height" ) :
731
+ elHeight;
732
+
733
+ return {
734
+ height: elHeight,
735
+ width: elWidth
736
+ };
737
+ },
738
+
739
+ _getElementTheoreticalSize: function( element, extraSize, dimension ) {
740
+
741
+ // offsetWidth/offsetHeight is a rounded sum of content, padding, scroll gutter, and border
742
+ var size = Math.max( 0, Math.ceil(
743
+ element.get( 0 )[ "offset" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 ) ] -
744
+ extraSize[ dimension ] -
745
+ 0.5
746
+
747
+ // If offsetWidth/offsetHeight is unknown, then we can't determine theoretical size.
748
+ // Use an explicit zero to avoid NaN.
749
+ // See https://github.com/jquery/jquery/issues/3964
750
+ ) ) || 0;
751
+
752
+ return size;
753
+ },
754
+
704
755
  _proportionallyResize: function() {
705
756
 
706
757
  if ( !this._proportionallyResizeElements.length ) {
@@ -1055,9 +1106,11 @@ $.ui.plugin.add( "resizable", "alsoResize", {
1055
1106
  o = that.options;
1056
1107
 
1057
1108
  $( o.alsoResize ).each( function() {
1058
- var el = $( this );
1109
+ var el = $( this ),
1110
+ elSize = that._calculateAdjustedElementDimensions( el );
1111
+
1059
1112
  el.data( "ui-resizable-alsoresize", {
1060
- width: parseFloat( el.css( "width" ) ), height: parseFloat( el.css( "height" ) ),
1113
+ width: elSize.width, height: elSize.height,
1061
1114
  left: parseFloat( el.css( "left" ) ), top: parseFloat( el.css( "top" ) )
1062
1115
  } );
1063
1116
  } );
@@ -1119,7 +1172,7 @@ $.ui.plugin.add( "resizable", "ghost", {
1119
1172
 
1120
1173
  // DEPRECATED
1121
1174
  // TODO: remove after 1.12
1122
- if ( $.uiBackCompat !== false && typeof that.options.ghost === "string" ) {
1175
+ if ( $.uiBackCompat === true && typeof that.options.ghost === "string" ) {
1123
1176
 
1124
1177
  // Ghost option
1125
1178
  that.ghost.addClass( this.options.ghost );
@@ -1,12 +1,11 @@
1
1
  //= require jquery-ui/widgets/mouse
2
2
  //= require jquery-ui/data
3
- //= require jquery-ui/ie
4
3
  //= require jquery-ui/scroll-parent
5
4
  //= require jquery-ui/version
6
5
  //= require jquery-ui/widget
7
6
 
8
7
  /*!
9
- * jQuery UI Sortable 1.13.3
8
+ * jQuery UI Sortable 1.14.2
10
9
  * https://jqueryui.com
11
10
  *
12
11
  * Copyright OpenJS Foundation and other contributors
@@ -31,7 +30,6 @@
31
30
  "jquery",
32
31
  "./mouse",
33
32
  "../data",
34
- "../ie",
35
33
  "../scroll-parent",
36
34
  "../version",
37
35
  "../widget"
@@ -45,7 +43,7 @@
45
43
  "use strict";
46
44
 
47
45
  return $.widget( "ui.sortable", $.ui.mouse, {
48
- version: "1.13.3",
46
+ version: "1.14.2",
49
47
  widgetEventPrefix: "sort",
50
48
  ready: false,
51
49
  options: {
@@ -283,11 +281,7 @@ return $.widget( "ui.sortable", $.ui.mouse, {
283
281
  if ( o.cursor && o.cursor !== "auto" ) { // cursor option
284
282
  body = this.document.find( "body" );
285
283
 
286
- // Support: IE
287
- this.storedCursor = body.css( "cursor" );
288
- body.css( "cursor", o.cursor );
289
-
290
- this.storedStylesheet =
284
+ this._storedStylesheet =
291
285
  $( "<style>*{ cursor: " + o.cursor + " !important; }</style>" ).appendTo( body );
292
286
  }
293
287
 
@@ -1204,11 +1198,9 @@ return $.widget( "ui.sortable", $.ui.mouse, {
1204
1198
  po.top += this.scrollParent.scrollTop();
1205
1199
  }
1206
1200
 
1207
- // This needs to be actually done for all browsers, since pageX/pageY includes this
1208
- // information with an ugly IE fix
1209
- if ( this.offsetParent[ 0 ] === this.document[ 0 ].body ||
1210
- ( this.offsetParent[ 0 ].tagName &&
1211
- this.offsetParent[ 0 ].tagName.toLowerCase() === "html" && $.ui.ie ) ) {
1201
+ // This needs to be actually done for all browsers, since pageX/pageY includes
1202
+ // this information.
1203
+ if ( this.offsetParent[ 0 ] === this.document[ 0 ].body ) {
1212
1204
  po = { top: 0, left: 0 };
1213
1205
  }
1214
1206
 
@@ -1556,9 +1548,9 @@ return $.widget( "ui.sortable", $.ui.mouse, {
1556
1548
  }
1557
1549
 
1558
1550
  //Do what was originally in plugins
1559
- if ( this.storedCursor ) {
1560
- this.document.find( "body" ).css( "cursor", this.storedCursor );
1561
- this.storedStylesheet.remove();
1551
+ if ( this._storedStylesheet ) {
1552
+ this._storedStylesheet.remove();
1553
+ this._storedStylesheet = null;
1562
1554
  }
1563
1555
  if ( this._storedOpacity ) {
1564
1556
  this.helper.css( "opacity", this._storedOpacity );