unpoly-rails 3.2.1 → 3.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/assets/unpoly/unpoly.es6.js +11 -6
- data/assets/unpoly/unpoly.es6.min.js +1 -1
- data/assets/unpoly/unpoly.js +11 -6
- data/assets/unpoly/unpoly.min.js +1 -1
- data/lib/unpoly/rails/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: daf4abb8b087b111de90afd35e1d9ff4438ae3b933e996c0d18ff0d0c5c4f45e
|
4
|
+
data.tar.gz: 6e842eeded7fcdf22368de54a5ebc5b38651273c7daeae24a5380d2e56272f24
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8ba599fa01552bc68b252fba438a204ee07d763a2e0c4672067b81dd304c6fb8631562999a7060c681d347da2a38b694b7ddc442368a94489ef2162131aeafa8
|
7
|
+
data.tar.gz: e7e1a9bc897528d53c9331e0b1961b9b4db336645f8f5ec0065156d809034c3b410a36bffdf74e70b1bf5bc8b2a970e334b8140d1696588f709de315037ac7e1
|
data/assets/unpoly/unpoly.es6.js
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
/***/ (() => {
|
6
6
|
|
7
7
|
window.up = {
|
8
|
-
version: '3.2.
|
8
|
+
version: '3.2.2'
|
9
9
|
};
|
10
10
|
|
11
11
|
|
@@ -943,7 +943,7 @@ up.element = (function () {
|
|
943
943
|
results.push(...root.querySelectorAll(selector));
|
944
944
|
return results;
|
945
945
|
}
|
946
|
-
function
|
946
|
+
function contains(root, selectorOrElement) {
|
947
947
|
const element = getOne(selectorOrElement);
|
948
948
|
return Node.prototype.contains.call(root, element);
|
949
949
|
}
|
@@ -1444,7 +1444,7 @@ up.element = (function () {
|
|
1444
1444
|
}
|
1445
1445
|
return {
|
1446
1446
|
subtree,
|
1447
|
-
|
1447
|
+
contains,
|
1448
1448
|
closestAttr,
|
1449
1449
|
ancestor,
|
1450
1450
|
around,
|
@@ -8006,8 +8006,13 @@ up.fragment = (function () {
|
|
8006
8006
|
selector = buildSelector(selector, element, options);
|
8007
8007
|
return selector.subtree(element);
|
8008
8008
|
}
|
8009
|
-
function contains(
|
8010
|
-
|
8009
|
+
function contains(root, selectorOrElement) {
|
8010
|
+
if (u.isElement(selectorOrElement)) {
|
8011
|
+
return e.contains(root, selectorOrElement) && up.layer.get(root).contains(selectorOrElement);
|
8012
|
+
}
|
8013
|
+
else {
|
8014
|
+
return getSubtree(root, selectorOrElement).length > 0;
|
8015
|
+
}
|
8011
8016
|
}
|
8012
8017
|
function closest(element, selector, options) {
|
8013
8018
|
element = e.get(element);
|
@@ -8652,7 +8657,7 @@ up.viewport = (function () {
|
|
8652
8657
|
}
|
8653
8658
|
function focusedElementWithin(scopeElement) {
|
8654
8659
|
const focusedElement = document.activeElement;
|
8655
|
-
if (
|
8660
|
+
if (up.fragment.contains(scopeElement, focusedElement)) {
|
8656
8661
|
return focusedElement;
|
8657
8662
|
}
|
8658
8663
|
}
|