Merge branch 'bugfix/public-room-link' of github.com:ONLYOFFICE/DocSpace into bugfix/public-room-link
This commit is contained in:
commit
23e9d543a8
@ -12,7 +12,7 @@ import Scrollbar from "../../scrollbar";
|
||||
import ToggleButton from "../../toggle-button";
|
||||
import { SubMenuItem } from "../styled-context-menu";
|
||||
import Loaders from "@docspace/common/components/Loaders";
|
||||
import { isMobile } from "react-device-detect";
|
||||
import { isMobile, isMobileOnly } from "react-device-detect";
|
||||
|
||||
const SubMenu = (props) => {
|
||||
const {
|
||||
@ -33,7 +33,7 @@ const SubMenu = (props) => {
|
||||
const theme = useTheme();
|
||||
|
||||
const onItemMouseEnter = (e, item) => {
|
||||
if (item.disabled || isMobile) {
|
||||
if (item.disabled) {
|
||||
e.preventDefault();
|
||||
return;
|
||||
}
|
||||
@ -44,8 +44,9 @@ const SubMenu = (props) => {
|
||||
const onItemClick = (e, item) => {
|
||||
if (item.onLoad) {
|
||||
e.preventDefault();
|
||||
if (!isMobileOnly) return;
|
||||
|
||||
if (isMobile) onMobileItemClick(e, item.onLoad);
|
||||
if (isMobileOnly) onMobileItemClick(e, item.onLoad);
|
||||
else onLeafClick(e);
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user