From 6dff92db4577d5c0d36837be3cb94ec732162f4b Mon Sep 17 00:00:00 2001 From: Jared Vititoe Date: Fri, 30 Jan 2026 23:49:21 -0500 Subject: [PATCH] Add debugging for reply button click issue --- assets/js/ticket.js | 4 ++++ views/TicketView.php | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/assets/js/ticket.js b/assets/js/ticket.js index 4323afa..7d78f64 100644 --- a/assets/js/ticket.js +++ b/assets/js/ticket.js @@ -1232,6 +1232,7 @@ document.addEventListener('DOMContentLoaded', function() { if (!target) return; const action = target.dataset.action; + console.log('Action clicked:', action, 'Target:', target); switch (action) { case 'remove-dependency': removeDependency(target.dataset.dependencyId); @@ -1457,10 +1458,13 @@ function deleteComment(commentId) { * Show reply form for a comment */ function showReplyForm(commentId, userName) { + console.log('showReplyForm called:', commentId, userName); + // Remove any existing reply forms document.querySelectorAll('.reply-form-container').forEach(form => form.remove()); const commentDiv = document.querySelector(`.comment[data-comment-id="${commentId}"]`); + console.log('commentDiv found:', commentDiv); if (!commentDiv) return; const replyFormHtml = ` diff --git a/views/TicketView.php b/views/TicketView.php index 15b7008..1fdb3ff 100644 --- a/views/TicketView.php +++ b/views/TicketView.php @@ -362,7 +362,7 @@ $nonce = SecurityHeadersMiddleware::getNonce(); echo "
"; // Reply button (max depth of 3) if ($threadDepth < 3) { - echo ""; + echo ""; } // Edit/Delete buttons for owner or admin if ($canModify) {