@primer/behaviors 1.3.4-rc.8269a12 → 1.3.5-rc.d479f9d

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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @primer/behaviors
2
2
 
3
+ ## 1.3.5
4
+
5
+ ### Patch Changes
6
+
7
+ - [#197](https://github.com/primer/behaviors/pull/197) [`ac8ea59`](https://github.com/primer/behaviors/commit/ac8ea59670099b836ed69e3dcf5b1b62cbbd2db3) Thanks [@jonrohan](https://github.com/jonrohan)! - Check if popover supported in isTopLayer
8
+
3
9
  ## 1.3.4
4
10
 
5
11
  ### Patch Changes
@@ -38,15 +38,16 @@ function getPositionedParent(element) {
38
38
  return document.body;
39
39
  }
40
40
  function isOnTopLayer(element) {
41
+ var _a;
41
42
  if (element.tagName === 'DIALOG') {
42
43
  return true;
43
44
  }
44
45
  try {
45
- if (element.matches(':popover-open')) {
46
+ if (element.matches(':popover-open') && /native code/.test((_a = document.body.showPopover) === null || _a === void 0 ? void 0 : _a.toString())) {
46
47
  return true;
47
48
  }
48
49
  }
49
- catch (_a) {
50
+ catch (_b) {
50
51
  return false;
51
52
  }
52
53
  return false;
@@ -34,15 +34,16 @@ function getPositionedParent(element) {
34
34
  return document.body;
35
35
  }
36
36
  function isOnTopLayer(element) {
37
+ var _a;
37
38
  if (element.tagName === 'DIALOG') {
38
39
  return true;
39
40
  }
40
41
  try {
41
- if (element.matches(':popover-open')) {
42
+ if (element.matches(':popover-open') && /native code/.test((_a = document.body.showPopover) === null || _a === void 0 ? void 0 : _a.toString())) {
42
43
  return true;
43
44
  }
44
45
  }
45
- catch (_a) {
46
+ catch (_b) {
46
47
  return false;
47
48
  }
48
49
  return false;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@primer/behaviors",
3
- "version": "1.3.4-rc.8269a12",
3
+ "version": "1.3.5-rc.d479f9d",
4
4
  "description": "Shared behaviors for JavaScript components",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",