Browse Source

Merge pull request #1125 from camargo/dev

Prefer Polymer first over $ for DOM selection in _clone
pull/1134/merge
Lebedev Konstantin 8 years ago committed by GitHub
parent
commit
db57cd2ebd
  1. 17
      Sortable.js
  2. 2
      Sortable.min.js

17
Sortable.js

@ -1421,12 +1421,15 @@
} }
function _clone(el) { function _clone(el) {
return $ if (Polymer && Polymer.dom) {
? $(el).clone(true)[0] return Polymer.dom(el).cloneNode(true);
: (Polymer && Polymer.dom }
? Polymer.dom(el).cloneNode(true) else if ($) {
: el.cloneNode(true) return $(el).clone(true)[0];
); }
else {
return el.cloneNode(true);
}
} }
function _saveInputCheckedState(root) { function _saveInputCheckedState(root) {
@ -1439,7 +1442,7 @@
} }
} }
// Fixed #973: // Fixed #973:
_on(document, 'touchmove', function (evt) { _on(document, 'touchmove', function (evt) {
if (Sortable.active) { if (Sortable.active) {
evt.preventDefault(); evt.preventDefault();

2
Sortable.min.js vendored

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