From ac97dcb092a7a86148eaaa7d8c73e9f116348f7f Mon Sep 17 00:00:00 2001 From: manukminasyan Date: Fri, 27 Mar 2026 21:04:34 +0400 Subject: [PATCH] fix: replace form elements with div+wire:click to prevent nested form conflicts The CommentsAction slide-over wraps content in a Filament action form. Nested
elements inside the comments Livewire templates caused the browser to submit the outer action form instead, closing the slide-over without storing the comment. Replace with
and type="submit" buttons with type="button" wire:click for all three forms (comment, edit, reply). --- resources/views/livewire/comment-item.blade.php | 12 ++++++------ resources/views/livewire/comments.blade.php | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/resources/views/livewire/comment-item.blade.php b/resources/views/livewire/comment-item.blade.php index b65e940..2e08625 100644 --- a/resources/views/livewire/comment-item.blade.php +++ b/resources/views/livewire/comment-item.blade.php @@ -32,13 +32,13 @@ {{-- Body or edit form --}} @if ($isEditing) - +
{{ $this->editForm }}
- +
- +
@else
{!! $comment->renderBodyWithMentions() !!} @@ -104,7 +104,7 @@ {{-- Reply form --}} @if ($isReplying) -
+
{{ $this->replyForm }} @if (\Relaticle\Comments\CommentsConfig::areAttachmentsEnabled()) @@ -135,10 +135,10 @@ @endif
- +
- +
@endif {{-- Nested replies --}} diff --git a/resources/views/livewire/comments.blade.php b/resources/views/livewire/comments.blade.php index 2b3e4c7..79f6048 100644 --- a/resources/views/livewire/comments.blade.php +++ b/resources/views/livewire/comments.blade.php @@ -60,7 +60,7 @@ {{-- New comment form - only for authorized users --}} @auth @can('create', \Relaticle\Comments\CommentsConfig::getCommentModel()) -
+
{{ $this->commentForm }} @if (\Relaticle\Comments\CommentsConfig::areAttachmentsEnabled()) @@ -91,14 +91,14 @@ @endif
-
- +
@endcan @endauth