fix: close on drag start

This commit is contained in:
IlyaDoronin 2024-03-15 17:56:39 +03:00
parent 26e41b6e2a
commit c4ad3de036

@ -29,6 +29,7 @@ import {
useTheme, useTheme,
} from "@mui/material"; } from "@mui/material";
import { import {
collapseAllQuestions,
copyQuestion, copyQuestion,
deleteQuestion, deleteQuestion,
deleteQuestionWithTimeout, deleteQuestionWithTimeout,
@ -324,19 +325,19 @@ const QuestionPageCardTitle = memo<Props>(function ({
{page + 1} {page + 1}
</Box> </Box>
)} )}
{!isExpanded && ( <IconButton
<IconButton disableRipple
disableRipple sx={{
sx={{ padding: isMobile ? "0" : "0 5px",
padding: isMobile ? "0" : "0 5px", right: isMobile ? "0" : null,
right: isMobile ? "0" : null, bottom: isMobile ? "0" : null,
bottom: isMobile ? "0" : null, }}
}} {...draggableProps}
{...draggableProps} onMouseDown={collapseAllQuestions}
> onTouchStart={collapseAllQuestions}
<PointsIcon style={{ color: "#4D4D4D", fontSize: "30px" }} /> >
</IconButton> <PointsIcon style={{ color: "#4D4D4D", fontSize: "30px" }} />
)} </IconButton>
</Box> </Box>
</Box> </Box>
); );