We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents dc38e43 + b8a358a commit 94ffa4bCopy full SHA for 94ffa4b
Sortable.js
@@ -1427,15 +1427,11 @@
1427
1428
function _matches(/**HTMLElement*/el, /**String*/selector) {
1429
if (el) {
1430
- selector = selector.split('.');
1431
-
1432
- var tag = selector.shift().toUpperCase(),
1433
- re = new RegExp('\\s(' + selector.join('|') + ')(?=\\s)', 'g');
1434
1435
- return (
1436
- (tag === '' || el.nodeName.toUpperCase() == tag) &&
1437
- (!selector.length || ((' ' + el.className + ' ').match(re) || []).length == selector.length)
1438
- );
+ if (el.matches) {
+ return el.matches(selector);
+ } else if (el.msMatchesSelector) {
+ return el.msMatchesSelector(selector);
+ }
1439
}
1440
1441
return false;
0 commit comments