@@ -158,7 +158,7 @@ $.widget("ui.sortable", $.ui.mouse, {
158
158
159
159
_mouseStart : function ( event , overrideHandle , noActivation ) {
160
160
161
- var i ,
161
+ var i , body ,
162
162
o = this . options ;
163
163
164
164
this . currentContainer = this ;
@@ -228,11 +228,14 @@ $.widget("ui.sortable", $.ui.mouse, {
228
228
this . _setContainment ( ) ;
229
229
}
230
230
231
- if ( o . cursor ) { // cursor option
232
- if ( $ ( "body" ) . css ( "cursor" ) ) {
233
- this . _storedCursor = $ ( "body" ) . css ( "cursor" ) ;
234
- }
235
- $ ( "body" ) . css ( "cursor" , o . cursor ) ;
231
+ if ( o . cursor && o . cursor !== "auto" ) { // cursor option
232
+ body = this . document . find ( "body" ) ;
233
+
234
+ // support: IE
235
+ this . storedCursor = body . css ( "cursor" ) ;
236
+ body . css ( "cursor" , o . cursor ) ;
237
+
238
+ this . storedStylesheet = $ ( "<style>*{ cursor: " + o . cursor + " !important; }</style>" ) . appendTo ( body ) ;
236
239
}
237
240
238
241
if ( o . opacity ) { // opacity option
@@ -1178,8 +1181,9 @@ $.widget("ui.sortable", $.ui.mouse, {
1178
1181
}
1179
1182
1180
1183
//Do what was originally in plugins
1181
- if ( this . _storedCursor ) {
1182
- $ ( "body" ) . css ( "cursor" , this . _storedCursor ) ;
1184
+ if ( this . storedCursor ) {
1185
+ this . document . find ( "body" ) . css ( "cursor" , this . storedCursor ) ;
1186
+ this . storedStylesheet . remove ( ) ;
1183
1187
}
1184
1188
if ( this . _storedOpacity ) {
1185
1189
this . helper . css ( "opacity" , this . _storedOpacity ) ;
0 commit comments