@learningpool/ui 1.10.4 → 1.10.6

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.
@@ -41,7 +41,9 @@ var VerticalNavigationItem = function (props) {
41
41
  handlePopoverClose();
42
42
  return;
43
43
  }
44
- setAnchorEl(event === null || event === void 0 ? void 0 : event.currentTarget);
44
+ if (!isDrawerOpen) {
45
+ setAnchorEl(event === null || event === void 0 ? void 0 : event.currentTarget);
46
+ }
45
47
  };
46
48
  var handlePopoverClose = function () {
47
49
  setAnchorEl(null);
@@ -83,8 +85,9 @@ var VerticalNavigationItem = function (props) {
83
85
  var CLOSE_SUBMENU_DELAY = 200;
84
86
  if (event.type === 'blur') {
85
87
  setTimeout(function () {
88
+ var _a;
86
89
  // @ts-expect-error
87
- var isMenuFocus = flyoutRef.current.contains(window.document.activeElement) || ref === window.document.activeElement;
90
+ var isMenuFocus = ((_a = flyoutRef.current) === null || _a === void 0 ? void 0 : _a.contains(window.document.activeElement)) || ref.current === window.document.activeElement;
88
91
  if (!isMenuFocus) {
89
92
  handlePopoverClose();
90
93
  }
@@ -27,7 +27,8 @@ var VerticalNavigationItemFlyoutMenu = forwardRef(function (props, ref) {
27
27
  var CLOSE_SUBMENU_DELAY = 200;
28
28
  if (event.type === 'blur') {
29
29
  setTimeout(function () {
30
- var isMenuFocus = (ref === null || ref === void 0 ? void 0 : ref.current.contains(window.document.activeElement)) || parentItemRef === window.document.activeElement;
30
+ var _a;
31
+ var isMenuFocus = ((_a = ref === null || ref === void 0 ? void 0 : ref.current) === null || _a === void 0 ? void 0 : _a.contains(window.document.activeElement)) || parentItemRef.current === window.document.activeElement;
31
32
  if (!isMenuFocus) {
32
33
  setAnchorEl(null);
33
34
  }
package/package.json CHANGED
@@ -9,7 +9,7 @@
9
9
  "components",
10
10
  "ui"
11
11
  ],
12
- "version": "1.10.4",
12
+ "version": "1.10.6",
13
13
  "private": false,
14
14
  "main": "index.js",
15
15
  "module": "index.js",