From 3d5ac70f0a1afa5a77ba1f9e2b23819fb07d5ad1 Mon Sep 17 00:00:00 2001 From: Sascha Date: Tue, 30 Mar 2021 21:46:39 +0200 Subject: Only set bugtitle if title is diffrent --- webui/src/components/BugTitleForm/BugTitleForm.tsx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/webui/src/components/BugTitleForm/BugTitleForm.tsx b/webui/src/components/BugTitleForm/BugTitleForm.tsx index a7d5a820..bb4d2aa2 100644 --- a/webui/src/components/BugTitleForm/BugTitleForm.tsx +++ b/webui/src/components/BugTitleForm/BugTitleForm.tsx @@ -78,6 +78,10 @@ function BugTitleForm({ bug }: Props) { function submitNewTitle() { if (!isFormValid()) return; + if (bug.title === issueTitleInput.value) { + cancelChange(); + return; + } setTitle({ variables: { input: { @@ -106,7 +110,7 @@ function BugTitleForm({ bug }: Props) { function editableBugTitle() { return ( -
+ { issueTitleInput = node; @@ -123,7 +127,7 @@ function BugTitleForm({ bug }: Props) { className={classes.saveButton} size="small" variant="contained" - type="submit" + onClick={() => submitNewTitle()} disabled={issueTitle.length === 0} > Save -- cgit