feat: prevent context menu on Windows close #22

This commit is contained in:
GyDi 2022-03-19 19:28:53 +08:00
parent 98fa4d5e65
commit 4ce15577cd
No known key found for this signature in database
GPG Key ID: 1C95E0D3467B3084

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),