Commit 5be711ab authored by Fatih Acet's avatar Fatih Acet

Add confirmation modal before cancelling the comment form in diff line note form.

parent e868d09d
......@@ -57,10 +57,16 @@ export default {
...mapActions('diffs', ['cancelCommentForm']),
...mapActions(['saveNote', 'refetchDiscussionById']),
handleCancelCommentForm() {
if (!window.confirm('Are you sure you want to cancel creating this comment?')) {
return;
}
this.cancelCommentForm({
lineCode: this.line.lineCode,
});
this.resetAutoSave();
this.$nextTick(() => {
this.resetAutoSave();
});
},
handleSaveNote(note) {
const selectedDiffFile = this.getDiffFileByHash(this.diffFileHash);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment