diff --git a/.gitignore b/.gitignore index 212b8c14..e8a47f60 100644 --- a/.gitignore +++ b/.gitignore @@ -14,4 +14,5 @@ yarn-error.log yarn.lock playwright-report -test-results \ No newline at end of file +test-results +.vscode \ No newline at end of file diff --git a/src/lib/components/lemmy/comment/CommentForm.svelte b/src/lib/components/lemmy/comment/CommentForm.svelte index 514b19e3..ce39199d 100644 --- a/src/lib/components/lemmy/comment/CommentForm.svelte +++ b/src/lib/components/lemmy/comment/CommentForm.svelte @@ -26,6 +26,7 @@ required?: boolean id?: string label?: string + editing?: boolean oncomment?: (comment: CommentResponse) => void onconfirm?: (value: string) => void oncancel?: (cancel: boolean) => void @@ -41,6 +42,7 @@ value = $bindable(''), actions = true, preview: previewAction = true, + editing = false, oncancel, oncomment, ...rest @@ -51,7 +53,13 @@ let language: number | undefined = $state() async function submit() { - if (!profile.current?.user || !profile.current?.jwt || value == '') return + if ( + !profile.current?.user || + !profile.current?.jwt || + value == '' || + editing + ) + return loading = true