feat: prevent context menu on Windows close #22

This commit is contained in:
GyDi 2022-03-19 19:28:53 +08:00
parent 145f6e2d53
commit e115432e11

View File

@ -84,6 +84,10 @@ const Layout = () => {
elevation={0}
className={`${isWinOs ? "windows " : ""}layout`}
onPointerDown={onDragging}
onContextMenu={(e) => {
// only prevent it on Windows
if (isWinOs) e.preventDefault();
}}
sx={[
(theme) => ({
bgcolor: alpha(theme.palette.background.paper, blur ? 0.85 : 1),