@seafile/seafile-editor 1.0.32-13 → 1.0.32-14
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.
|
@@ -23,8 +23,8 @@ const MenuDropDown = props => {
|
|
|
23
23
|
} = useTranslation(TRANSLATE_NAMESPACE);
|
|
24
24
|
const containerId = useMemo(() => "menu-dropdown-".concat(id), [id]);
|
|
25
25
|
const handleHideDropDownList = useCallback(e => {
|
|
26
|
-
var _menuDropdownRef$curr;
|
|
27
|
-
const isClickOnMenuItem = menuItemRef.current.contains(e.target);
|
|
26
|
+
var _menuItemRef$current, _menuDropdownRef$curr;
|
|
27
|
+
const isClickOnMenuItem = menuItemRef === null || menuItemRef === void 0 ? void 0 : (_menuItemRef$current = menuItemRef.current) === null || _menuItemRef$current === void 0 ? void 0 : _menuItemRef$current.contains(e.target);
|
|
28
28
|
const isClickOnMenuDropdown = menuDropdownRef === null || menuDropdownRef === void 0 ? void 0 : (_menuDropdownRef$curr = menuDropdownRef.current) === null || _menuDropdownRef$curr === void 0 ? void 0 : _menuDropdownRef$curr.contains(e.target);
|
|
29
29
|
// If click on menu item, menu dropdown will show, and click on menu dropdown, menu dropdown will hide
|
|
30
30
|
if (!isShowDropDown && isClickOnMenuItem && !isClickOnMenuDropdown) return;
|