mirror of
https://github.com/makeplane/plane
synced 2024-06-14 14:31:34 +00:00
Merge branch 'preview' of gurusainath:makeplane/plane into revamp-estimates
This commit is contained in:
commit
0a839cd113
@ -81,7 +81,7 @@ export const InboxIssueCreateRoot: FC<TInboxIssueCreateRoot> = observer((props)
|
|||||||
const handleFormSubmit = async (event: FormEvent<HTMLFormElement>) => {
|
const handleFormSubmit = async (event: FormEvent<HTMLFormElement>) => {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
|
|
||||||
if (descriptionEditorRef.current?.isEditorReadyToDiscard()) {
|
if (!descriptionEditorRef.current?.isEditorReadyToDiscard()) {
|
||||||
setToast({
|
setToast({
|
||||||
type: TOAST_TYPE.ERROR,
|
type: TOAST_TYPE.ERROR,
|
||||||
title: "Error!",
|
title: "Error!",
|
||||||
|
@ -129,7 +129,7 @@ export const IssueFormRoot: FC<IssueFormProps> = observer((props) => {
|
|||||||
const { getProjectById } = useProject();
|
const { getProjectById } = useProject();
|
||||||
const { areEstimateEnabledByProjectId } = useProjectEstimates();
|
const { areEstimateEnabledByProjectId } = useProjectEstimates();
|
||||||
|
|
||||||
function handleKeyDown(event: KeyboardEvent) {
|
const handleKeyDown = (event: KeyboardEvent) => {
|
||||||
if (editorRef.current?.isEditorReadyToDiscard()) {
|
if (editorRef.current?.isEditorReadyToDiscard()) {
|
||||||
onClose();
|
onClose();
|
||||||
} else {
|
} else {
|
||||||
@ -140,7 +140,7 @@ export const IssueFormRoot: FC<IssueFormProps> = observer((props) => {
|
|||||||
});
|
});
|
||||||
event.preventDefault(); // Prevent default action if editor is not ready to discard
|
event.preventDefault(); // Prevent default action if editor is not ready to discard
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
useKeypress("Escape", handleKeyDown);
|
useKeypress("Escape", handleKeyDown);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user