Browse Source

+ master

pull/922/head
Lebedev Konstantin 8 years ago
parent
commit
7194499eb8
  1. 15
      Sortable.js
  2. 2
      Sortable.min.js

15
Sortable.js

@ -4,7 +4,7 @@
* @license MIT * @license MIT
*/ */
(function (factory) { (function sortableModule(factory) {
"use strict"; "use strict";
if (typeof define === "function" && define.amd) { if (typeof define === "function" && define.amd) {
@ -21,11 +21,11 @@
/* jshint sub:true */ /* jshint sub:true */
window["Sortable"] = factory(); window["Sortable"] = factory();
} }
})(function () { })(function sortableFactory() {
"use strict"; "use strict";
if (typeof window == "undefined" || !window.document) { if (typeof window == "undefined" || !window.document) {
return function SortableError() { return function sortableError() {
throw new Error("Sortable.js requires a window with a document"); throw new Error("Sortable.js requires a window with a document");
}; };
} }
@ -454,8 +454,11 @@
} }
try { try {
if (document.selection) { if (document.selection) {
document.selection.empty(); // Timeout neccessary for IE9
setTimeout(function () {
document.selection.empty();
});
} else { } else {
window.getSelection().removeAllRanges(); window.getSelection().removeAllRanges();
} }
@ -876,6 +879,7 @@
} }
if (Sortable.active) { if (Sortable.active) {
/* jshint eqnull:true */
if (newIndex == null || newIndex === -1) { if (newIndex == null || newIndex === -1) {
newIndex = oldIndex; newIndex = oldIndex;
} }
@ -892,7 +896,6 @@
this._nulling(); this._nulling();
}, },
_nulling: function() { _nulling: function() {
rootEl = rootEl =
dragEl = dragEl =

2
Sortable.min.js vendored

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save