@szhsin/react-menu
Advanced tools
Comparing version 4.0.4-alpha.1 to 4.1.0
@@ -319,3 +319,4 @@ import { useState, useReducer, useContext, useRef, useCallback, useEffect, useMemo } from 'react'; | ||
const id = setTimeout(() => { | ||
if (!menuRef.current.contains(document.activeElement)) { | ||
const menuElt = menuRef.current; | ||
if (menuElt && !menuElt.contains(document.activeElement)) { | ||
focusRef.current.focus(); | ||
@@ -322,0 +323,0 @@ setItemFocus(); |
@@ -16,3 +16,3 @@ const createSubmenuCtx = () => { | ||
} else { | ||
settled == null ? void 0 : settled(); | ||
settled == null || settled(); | ||
} | ||
@@ -19,0 +19,0 @@ }, |
@@ -274,3 +274,3 @@ 'use strict'; | ||
} else { | ||
settled == null ? void 0 : settled(); | ||
settled == null || settled(); | ||
} | ||
@@ -1176,3 +1176,4 @@ }, | ||
const id = setTimeout(() => { | ||
if (!menuRef.current.contains(document.activeElement)) { | ||
const menuElt = menuRef.current; | ||
if (menuElt && !menuElt.contains(document.activeElement)) { | ||
focusRef.current.focus(); | ||
@@ -1179,0 +1180,0 @@ setItemFocus(); |
{ | ||
"name": "@szhsin/react-menu", | ||
"version": "4.0.4-alpha.1", | ||
"version": "4.1.0", | ||
"description": "React component for building accessible menu, dropdown, submenu, context menu and more.", | ||
@@ -57,3 +57,3 @@ "author": "Zheng Song", | ||
"@testing-library/react": "^14.0.0", | ||
"@types/jest": "^29.5.4", | ||
"@types/jest": "^29.5.5", | ||
"@types/react": "^18.2.21", | ||
@@ -63,3 +63,3 @@ "babel-plugin-pure-annotations": "^0.1.2", | ||
"dtslint": "^4.2.1", | ||
"eslint": "^8.49.0", | ||
"eslint": "^8.50.0", | ||
"eslint-config-prettier": "^8.8.0", | ||
@@ -70,3 +70,3 @@ "eslint-plugin-jest": "^27.2.3", | ||
"eslint-plugin-react-hooks-addons": "^0.3.1", | ||
"jest": "^29.6.4", | ||
"jest": "^29.7.0", | ||
"jest-environment-jsdom": "^29.7.0", | ||
@@ -73,0 +73,0 @@ "npm-run-all": "^4.1.5", |
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
161763
5174
0