Merge pull request #333 from makeplane/develop

Promote Develop to Preview
This commit is contained in:
sriram veeraghanta
2024-05-30 18:49:06 +05:30
committed by GitHub
2 changed files with 3 additions and 3 deletions

View File

@@ -81,7 +81,7 @@ export const InboxIssueCreateRoot: FC<TInboxIssueCreateRoot> = observer((props)
const handleFormSubmit = async (event: FormEvent<HTMLFormElement>) => {
event.preventDefault();
if (descriptionEditorRef.current?.isEditorReadyToDiscard()) {
if (!descriptionEditorRef.current?.isEditorReadyToDiscard()) {
setToast({
type: TOAST_TYPE.ERROR,
title: "Error!",

View File

@@ -122,7 +122,7 @@ export const IssueFormRoot: FC<IssueFormProps> = observer((props) => {
const { getProjectById } = useProject();
const { areEstimatesEnabledForProject } = useEstimate();
function handleKeyDown(event: KeyboardEvent) {
const handleKeyDown = (event: KeyboardEvent) => {
if (editorRef.current?.isEditorReadyToDiscard()) {
onClose();
} else {
@@ -133,7 +133,7 @@ export const IssueFormRoot: FC<IssueFormProps> = observer((props) => {
});
event.preventDefault(); // Prevent default action if editor is not ready to discard
}
}
};
useKeypress("Escape", handleKeyDown);