diff options
author | Michael Muré <batolettre@gmail.com> | 2021-04-10 09:52:17 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-10 09:52:17 +0200 |
commit | c71d26d513e4e5e36e6983e05dee4ad28ec664c7 (patch) | |
tree | 4c19961c28b7279594decb065870c3921051a7dd /webui/src/components/BugTitleForm | |
parent | d09b9d7c5a6cd8d201f2444ff1fb6302325e1651 (diff) | |
parent | f980d9487ed1e764a364d5a1f385a09835276962 (diff) | |
download | git-bug-c71d26d513e4e5e36e6983e05dee4ad28ec664c7.tar.gz |
Merge pull request #625 from GlancingMind/upstream-minor-bugfixes
Minor bugfixes
Diffstat (limited to 'webui/src/components/BugTitleForm')
-rw-r--r-- | webui/src/components/BugTitleForm/BugTitleForm.tsx | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/webui/src/components/BugTitleForm/BugTitleForm.tsx b/webui/src/components/BugTitleForm/BugTitleForm.tsx index 529f23a2..665ecd4c 100644 --- a/webui/src/components/BugTitleForm/BugTitleForm.tsx +++ b/webui/src/components/BugTitleForm/BugTitleForm.tsx @@ -79,6 +79,10 @@ function BugTitleForm({ bug }: Props) { function submitNewTitle() { if (!isFormValid()) return; + if (bug.title === issueTitleInput.value) { + cancelChange(); + return; + } setTitle({ variables: { input: { @@ -107,7 +111,7 @@ function BugTitleForm({ bug }: Props) { function editableBugTitle() { return ( - <form className={classes.headerTitle} onSubmit={submitNewTitle}> + <form className={classes.headerTitle}> <BugTitleInput inputRef={(node) => { issueTitleInput = node; @@ -124,7 +128,7 @@ function BugTitleForm({ bug }: Props) { className={classes.saveButton} size="small" variant="contained" - type="submit" + onClick={() => submitNewTitle()} disabled={issueTitle.length === 0} > Save |