unpoly-rails 3.2.1 → 3.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 79a9c4869d0ec45ad05907ff229067ef43891b59936aa069fd58551c673e3a77
4
- data.tar.gz: 89fe1f52966c22a19f7bf57db742ca1a0c14362f39a5755556be18e5d2af8c6c
3
+ metadata.gz: daf4abb8b087b111de90afd35e1d9ff4438ae3b933e996c0d18ff0d0c5c4f45e
4
+ data.tar.gz: 6e842eeded7fcdf22368de54a5ebc5b38651273c7daeae24a5380d2e56272f24
5
5
  SHA512:
6
- metadata.gz: 56e2152fe2c5c83d18ea818127d10abbb951649a134d54ecfe8905d8e97580fa9961f026fce11cff3f3ec835ab0d4eecb9755e1ed4131c1ceb0c93deb28062da
7
- data.tar.gz: b50e4f53131c9a1cbd5efa0a219dc3272a7bfd3aeae1404510b38724fdbc9e9af314e3e5655d1f0a2ec2e32c0e90a438388c36eb04df73a7816c3e1d53cf6df4
6
+ metadata.gz: 8ba599fa01552bc68b252fba438a204ee07d763a2e0c4672067b81dd304c6fb8631562999a7060c681d347da2a38b694b7ddc442368a94489ef2162131aeafa8
7
+ data.tar.gz: e7e1a9bc897528d53c9331e0b1961b9b4db336645f8f5ec0065156d809034c3b410a36bffdf74e70b1bf5bc8b2a970e334b8140d1696588f709de315037ac7e1
@@ -5,7 +5,7 @@
5
5
  /***/ (() => {
6
6
 
7
7
  window.up = {
8
- version: '3.2.1'
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 isInSubtree(root, selectorOrElement) {
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
- isInSubtree,
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(element, selector) {
8010
- return getSubtree(element, selector).length > 0;
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 (e.isInSubtree(scopeElement, focusedElement)) {
8660
+ if (up.fragment.contains(scopeElement, focusedElement)) {
8656
8661
  return focusedElement;
8657
8662
  }
8658
8663
  }