At my daughter’s funeral, her husband’s mistress leaned close and whispered, “I won”… until the lawyer stepped forward, asked for silence, and began reading the will.352

At my daughter’s funeral, her husband’s mistress leaned close and whispered, “I won”… until the lawyer stepped forward, asked for silence, and began reading the will.352

At my daughter’s funeral, her husband’s mistress leaned close and whispered, “I won”… until the lawyer stepped forward, asked for silence, and began reading the will.
Just as the service reached that fragile moment when everything feels suspended, the church doors swung open.
The sharp click of heels echoed across the marble—too loud, too cold, completely out of place.
I turned.
My son-in-law, Ethan Caldwell, walked in laughing.
Not slowly. Not respectfully. Not even pretending grief. He strode down the aisle like he was late for a party, not a funeral.
He wore a tailored suit, hair perfectly styled. On his arm was a young woman in a striking red dress, smiling far too confidently for someone standing in front of a coffin.
The room shifted. People murmured. Someone gasped. The priest froze mid-page.
Ethan didn’t care.
“Oh man, traffic downtown is insane,” he said casually, like he’d just arrived at brunch.
The woman beside him glanced around curiously—like this was some new venue she was exploring. When she passed me, she slowed, as if she might offer condolences.
Instead, she leaned in and whispered, ice-cold:
“Looks like I won.”
Something inside me shattered.
I wanted to scream. To drag her away from that coffin. To make them both feel even a fraction of what my daughter had endured.
But I didn’t move.
I clenched my jaw, fixed my eyes on the casket, and forced myself to breathe—because if I opened my mouth, I wouldn’t stop.
My daughter, Emily Carter, had come to my house weeks before… wearing long sleeves in the middle of summer.
“I’m just cold, Mom,” she’d said.
I pretended to believe her.
Other times, she smiled too hard—eyes glassy, like she’d cried and washed her face before anyone noticed.
“Ethan’s just stressed,” she’d repeat, over and over, as if that explained everything.
“Come home,” I told her. “You’re safe with me.”
“It’ll get better,” she insisted. “Now that the baby’s coming… it’ll change.”
I wanted to believe her.
God, I wanted to believe her.
Back in the church, Ethan dropped into the front pew like he owned the place. He draped his arm around the woman in red and even chuckled when the priest said the words “eternal love.”
I felt sick.
That’s when I noticed a man standing from the side aisle—Michael Reeves, Emily’s attorney.
I barely knew him. Quiet. Serious. The kind of man who carried weight in his silence.
He walked forward holding a sealed envelope like it mattered.
Because it did.
When he reached the front, he cleared his throat.
“Before the burial,” he said firmly, “I am required to carry out a direct legal instruction from the deceased. Her will will be read… now.”
A ripple moved through the church.
Ethan scoffed.
“A will? My wife didn’t have anything,” he said smugly.
Michael looked at him—not with anger, but with certainty.
“I’ll begin with the primary beneficiary.”
Then he said my name.
“Margaret Carter, mother of the deceased.”
My knees nearly gave out. I grabbed the pew to steady myself.
Even in death… my daughter was still protecting me.
Ethan shot to his feet.
“What? That’s not possible. There’s a mistake.”
Michael calmly opened the envelope and began reading.
Emily had left everything to me—the house, her savings, her car, every dollar she had worked for.
And more.
A private fund, created months earlier. Enough to start over. Enough to escape.
“This is ridiculous!” Ethan snapped. “I’m her husband! That all belongs to me!”
Michael raised a hand.
“Mrs. Carter also submitted documented evidence of domestic abuse. This includes recordings, written statements, and medical reports. The will was signed six months ago under full legal capacity.”
The air vanished from the room.
Someone whispered, “Oh my God.”
Someone else began to cry.
Ethan looked around, searching for support—but all he found were eyes that no longer believed him.

“Additionally,” Michael continued, “any life insurance or compensation will be managed by Mrs. Carter. If she is unable to serve, the funds will go to a foundation supporting victims of domestic violence.”
Ethan’s face drained of color.
“This is a setup!” he shouted. “She was manipulated!”
For the first time, I spoke.
“No,” I said, steady and clear. “She wasn’t manipulated. She was afraid. And still… she found the courage to do this.”
The woman in red stepped back, shaken.
“I… I didn’t know,” she stammered. “He said she was unstable… that she exaggerated everything…”
No one responded.
Because excuses didn’t matter anymore.
Truth did.
And the truth had just been read aloud beside a coffin.
Michael closed the document.
“The reading is complete.”
Ethan sank back into the pew—smaller now, stripped of his arrogance.
The service tried to continue.
But nothing was the same.
Because my daughter… even in silence… had spoken.
In the days that followed, grief turned into action.
With Michael’s help, I filed reports, submitted evidence, and made sure Emily’s voice didn’t disappear with her.
Ethan’s world began to crumble. Investigations opened. His lies unraveled.
The woman in red vanished.
And me?
I turned Emily’s house—the place where she had suffered—into something new.
A refuge.
Not perfect. Not grand. But real.
A place where women could walk in broken… and hear, “You’re safe now.”
Some nights, I still sit in the quiet and remember her.
Her laughter. Her hope. The way she said, “I’m fine” when she wasn’t.
It still hurts like the first day.
But now there’s something else too.
A fire.
Because my daughter didn’t just leave me an inheritance.
She left me a purpose.
And one truth I will never forget:
Silence doesn’t protect.
Silence destroys.
And speaking up—even with a trembling voice—can save a life.
“At My Daughter’s Funeral, Her Husband’s Mistress Whispered ‘I Won’—Until the Lawyer Opened the Will”
The church did not feel like a place of mourning.
It felt like a place holding its breath.
Every sound was too sharp. Every movement too visible. Even grief seemed afraid to make noise in front of the coffin resting at the front.
My daughter, Emily Carter, lay inside it.
And I still could not accept that she was gone.
The moment Ethan Caldwell entered, everything inside me tightened.
Not because of sorrow.
Because of disrespect.
He didn’t walk in like a grieving husband.
He walked in like a man arriving late to a meeting he still expected to control.
His suit was perfect. His hair was styled. His expression was almost… amused.
And on his arm—
her.
The woman in red.
Striking. Loud. Smiling like she belonged at a party, not beside a coffin.
The church shifted instantly.
Whispers rippled through the pews. Someone behind me muttered a prayer that sounded more like shock than faith.
Ethan didn’t even lower his voice.
“Traffic was brutal,” he said casually, like this was an inconvenience, not a funeral.
The woman in red glanced around the church like she was inspecting property.
Then she saw me.
And smiled.
Not politely.
Not nervously.
Triumphantly.
She leaned in just enough for only me to hear.
“Looks like I won.”
The words didn’t land like sound.
They landed like impact.
Something inside me cracked—not loudly, not dramatically—but in a way that made breathing suddenly difficult.
I didn’t move.
I couldn’t trust myself to.
If I stood up, I knew I would not stop.
Not stop screaming. Not stop breaking things. Not stop unraveling years of silence I had forced myself to carry for my daughter’s sake.
So I stayed seated.
Hands clenched.
Jaw locked.
Eyes fixed on the coffin.
My daughter.
Emily Carter.
Weeks before she died, she had come to my house wearing long sleeves in summer heat.
“I’m just cold,” she had said softly.
But I had seen the hesitation behind her smile.
The carefulness.
The way she kept adjusting her sleeves as if hiding something beneath them wasn’t a choice—it was survival.
“Ethan’s just stressed,” she used to say.
Always that line.
As if repetition could turn damage into normalcy.
As if naming the excuse enough times would make it true.
I had begged her once.
“Come home,” I told her. “Just for a while. You’re safe here.”
She had smiled.
Not happily.
Tiredly.
“It’ll get better,” she said. “Once the baby comes… everything will change.”
I believed her.
Or I wanted to.
And that difference cost me everything.
Back in the church, Ethan dropped into the front pew like he was settling into a theater seat.
The woman in red sat beside him, resting her hand lightly on his arm.
They looked comfortable.
Too comfortable.
Like the coffin in front of them was background decoration.
When the priest spoke the words eternal rest, Ethan actually chuckled.
A small sound.
But enough.
Enough to make several people shift uncomfortably.
Enough to make grief turn into something sharper.
That’s when I saw him.
Michael Reeves.
Emily’s attorney.
He was standing near the side aisle, holding a sealed envelope like it weighed more than paper should.
His expression was calm.
Not cold.
Not emotional.
Controlled.
He walked forward.
Every step measured.
Every movement deliberate.
The church quieted without being asked.
Even Ethan stopped smirking.
Michael stopped at the front.
He looked at the coffin once.
Then at the crowd.
Then said:
“Before the burial proceeds, I am required to carry out a legally binding instruction from the deceased.”
A pause.
Then—
“The will shall be read now.”
A wave of confusion moved through the church.
Murmurs. Head turns. Uneasy shifting.
Ethan scoffed loudly enough to be heard.
“A will?” he said. “She didn’t own anything.”
He laughed again.
Short. Confident.
Dismissive.
But Michael didn’t react.
He broke the seal.
And opened the envelope.
“I remind everyone present,” he said calmly, “that the following instructions were notarized, witnessed, and submitted under strict legal supervision one week prior to Emily Carter’s passing.”
The room changed.
Not emotionally.
Legally.
People leaned forward without realizing it.
Ethan leaned back.
Smiling again.
Still confident.
Still in control.
Still wrong.
Michael began reading.
“At the time of my death, I, Emily Carter, declare the following…”
The church went silent.
Even the air felt heavier.
“I hereby revoke all prior informal agreements regarding marital property control, shared assets, and financial authorization.”
A few heads turned toward Ethan.
He didn’t react yet.
Not fully.
“I further state that all assets acquired during my marriage to Ethan Caldwell—including but not limited to real estate holdings, joint accounts, investment portfolios, and business interests—are to be reassessed under concealed ownership verification.”
A flicker.
Just a flicker.
Across Ethan’s face.
The woman in red leaned slightly toward him.
“Is this normal?” she whispered.
He didn’t answer.
Michael continued.
“In addition, I designate all personal communications, financial transactions, and private recordings stored on encrypted devices to be transferred to legal counsel for posthumous review.”
That word landed differently.
Posthumous.
Permanent.

Final.
Then—
the envelope opened further.
A second document.
Different color.
Different seal.
Michael’s voice changed slightly.
“This portion pertains to undisclosed financial activity conducted during the final six months of marriage.”
Now the church wasn’t just listening.
It was holding still.
“Transactions involving account diversion, signature replication, and unauthorized asset consolidation have been documented and verified.”
A whisper broke somewhere in the back pew.
Then stopped.
Ethan shifted.
For the first time.
Uncomfortable.
Just slightly.
Michael looked up.
“Mr. Caldwell,” he said calmly, “you may wish to pay close attention.”
Ethan forced a smile.
But it didn’t reach his eyes anymore.
The priest lowered his head.
Not in prayer.
In instinctive retreat.
Michael continued.
“All financial control attributed to Ethan Caldwell under marital assumption is hereby declared invalid pending legal investigation into coercion, fraud, and exploitation.”
Silence.
Total silence.
Then—
the final clause.
Michael paused before reading it.
Longer than before.
“Finally…”
He looked at the coffin.
Then at the room.
Then said:
“Emily Carter names the sole beneficiary of her estate.”
A pause.
A breath held by everyone in the church.
Ethan leaned forward slightly.
Expecting.
Waiting.
Smiling again.
And then—
Michael said the name.
“Her mother.”
The silence that followed was not emotional.
It was structural.
Like something inside the church had collapsed without sound.
Ethan didn’t speak.
At first.
Then he laughed.
Once.
Confused.
Uncertain.
Then again.
Stronger.
“That’s impossible,” he said.
But his voice cracked on the last word.
The woman in red pulled her hand away from his arm.
Slowly.
As if distance might protect her from consequences.
Michael closed the folder.
“There is also additional evidence,” he said quietly, “regarding financial manipulation and emotional coercion submitted alongside this will.”
Now Ethan stood.
Too fast.
Too suddenly.
“What evidence?” he snapped.
But no one answered him.
Because someone had already begun walking down the aisle.
From the back.
Slow.
Deliberate.
A second lawyer.
Followed by a federal investigator.
Then another.
The church doors were open again.
But this time, no one came to mourn.
Ethan turned toward me.
For the first time since he entered.
Really looked at me.
Not as background.
Not as irrelevant.
But as something he had underestimated too long.
And in that moment—
he understood.
Not everything.
But enough.
The woman in red took a step back.
Then another.
Then left his side entirely.
Without looking at him again.
Ethan whispered:
“This isn’t over.”
But no one responded.
Because it already was.
As the investigators moved forward, Michael placed the final document on the coffin.
Not as symbolism.
But as closure.
And I finally stood.
Slowly.
Not for him.
Not for the room.
For Emily.
I walked forward.
Not toward Ethan.
Not toward the lawyer.
But toward the coffin.
And for the first time that entire day—
I cried.
Not for how she died.
But for how long she had been alone inside a marriage that pretended to love her.
Behind me, I heard Ethan say my name.
But it no longer meant anything.
Not to me.
Not anymore.
Because some truths don’t arrive at funerals.
They arrive after people think they’ve already won.
And by then—
it is too late to leave.
“At My Daughter’s Funeral, Her Husband’s Mistress Whispered ‘I Won’—Until the Lawyer Opened the Will” (FINAL EPILOGUE)
The church did not erupt.
It dissolved.
That was the only way I could describe it afterward.
Not chaos. Not shouting. Not dramatic collapse.
Just… the slow, irreversible realization that everything people believed was no longer real.
Ethan Caldwell didn’t resist when the investigators stepped closer.
At first.
He still tried to hold onto something—some expression, some version of himself that could turn this into a misunderstanding.
But there was nothing left to misunderstand.
“This is a violation of due process,” he said suddenly, louder now.
His voice cracked slightly on the last word.
The sound of a man realizing authority no longer responds to tone.
Only truth.
The investigator didn’t even look at him.
“Mr. Caldwell,” he said calmly, “you will come with us.”
That was it.
No debate.
No negotiation.
Just consequence arriving in plain language.
The woman in red—once so confident she had whispered victory into a mourning daughter’s grave—stood completely still.
Then she took a step backward.
Then another.
Slowly, carefully, like the room itself might punish her for staying too long.
And then she left him.
Without drama.
Without apology.
Without even looking back.
Ethan watched her go.
And for the first time that day, I saw it.
Not anger.
Not arrogance.
Loss of narrative.
The moment a man realizes he is no longer the center of anything.
He turned toward me.
Slowly.
Like he was trying to find the version of me that still belonged to his life.
But that version had died long before Emily did.
“You planned this,” he said quietly.
It wasn’t a question.
It was disbelief pretending to still be control.
I shook my head once.
“No,” I said.
A pause.
Then I added:
“She did.”
That landed differently.
Because for the first time, he looked at the coffin.
Really looked at it.
And saw what he had been too distracted to notice while performing dominance in a place built for grief.
Michael stepped forward again.
“This concludes the reading,” he said.
But no one moved.
Not immediately.
Because endings like this don’t allow immediate motion.
They require recalibration.
The priest finally closed his book.
No blessing followed.
There was nothing left to bless.
Outside, I could hear movement.
Doors opening.
Footsteps on stone.
Voices of people no longer pretending this was a normal day.
Ethan was escorted out.
Not dragged.
Not humiliated in the way he would have understood.
Just removed.
Efficiently.
As if he had always been temporary in this space.
When he passed me, he stopped.
Just for a second.
“Was any of it real?” he asked quietly.
Not rage.
Not pleading.
Just confusion at the collapse of his own story.
I looked at him for a long moment.
And then I answered honestly.
“Yes,” I said.
A pause.
“Her suffering was real.”
That was the last thing I said to him.
After he left, the church felt too large.
Not empty.
Just unoccupied in a way it hadn’t been before.
Like it was waiting for a different kind of ending that would never arrive.
I walked back to the coffin.
My hands touched the wood.
Cold.
Still.
Final.
“You tried,” I whispered.
Not to her.
To the absence of her.
“I’m sorry it took me so long to see it.”
Behind me, Michael spoke softly.
“There are recordings too,” he said. “She documented everything.”
I closed my eyes.
Because of course she did.
People don’t start documenting when they feel safe.
They start when they realize no one is coming.
“She wanted you to have proof,” he added.
I nodded once.
Slowly.
As if my body needed time to understand what my mind already knew.
The truth is this:
Grief is not always about death.
Sometimes it is about realizing how long someone survived without you noticing.
Days later, the news would call it many things.
A financial collapse.
A legal exposure.
A high-profile estate dispute.
But none of those words came close to what it actually was.
It was a daughter finally being believed.
Too late for her.
But not too late for the truth she left behind.
That night, I stood alone in her apartment.
Not the church.
Not the courtroom aftermath.
Her space.
The place she lived between moments where no one protected her.
I found her things untouched.
A mug still half-used.
A notebook open on the table.
A pen resting exactly where she left it.
As if she had only stepped away for a moment.
On the last page of the notebook, she had written one line.
No explanation.
No anger.
Just truth.
“I stopped waiting for him to change when I realized no one was coming to notice if I disappeared.”
I sat down.
And for the first time that entire day—
I didn’t feel like I was attending a funeral anymore.
I felt like I was arriving at the truth she had been carrying alone.
And in that silence, I understood something that changed everything:
Justice is not what happens in the courtroom.
It is what remains when silence finally loses its power to protect the people who created it.
And for Emily—
it arrived too late to save her life.
But just in time to make sure her story was never buried with her.
Report this article
Select a reason for reporting:
Inaccurate information Copyright violation Spam / advertisement Offensive content Other '; footer.hidden = true; overlay.hidden = false; document.body.style.overflow = 'hidden'; } function hideSection() { if (section) section.hidden = true; } function openModal() { if (alreadyReported) { showSuccess(); return; } overlay.hidden = false; document.body.style.overflow = 'hidden'; } function closeModal() { overlay.hidden = true; document.body.style.overflow = ''; footer.hidden = false; overlay.querySelectorAll('input[name="report_reason"]').forEach(function(r) { r.checked = false; }); document.getElementById('reportMessage').value = ''; errorBox.hidden = true; submitBtn.disabled = false; submitBtn.textContent = 'Submit report'; imageItems = []; imgGrid.innerHTML = ''; updateAttachBtn(); } btn.addEventListener('click', openModal); closeBtn.addEventListener('click', closeModal); cancelBtn.addEventListener('click', closeModal); overlay.addEventListener('click', function(e) { if (e.target === overlay) closeModal(); }); document.addEventListener('keydown', function(e) { if (!overlay.hidden && e.key === 'Escape') closeModal(); }); // --- Error helper --- function showError(msg) { errorBox.textContent = msg; errorBox.hidden = false; } // --- Submit --- submitBtn.addEventListener('click', function() { var selected = overlay.querySelector('input[name="report_reason"]:checked'); if (!selected) { showError('Please select a reason.'); return; } errorBox.hidden = true; submitBtn.disabled = true; var itemsToUpload = imageItems.filter(function(it) { return !it.uploadedUrl; }); if (itemsToUpload.length === 0) { doSubmit(selected.value); return; } submitBtn.textContent = 'Uploading…'; var done = 0, failed = 0; itemsToUpload.forEach(function(entry) { entry.statusEl.textContent = '…'; entry.statusEl.className = 'report-img-item__status'; entry.statusEl.hidden = false; resizeImage(entry.file, MAX_LONG_PX, function(resized) { uploadFile(resized, currentSlug, function(err, url) { done++; if (err) { failed++; entry.statusEl.textContent = 'Failed'; entry.statusEl.className = 'report-img-item__status err'; } else { entry.uploadedUrl = url; entry.statusEl.textContent = '✓'; entry.statusEl.className = 'report-img-item__status done'; } if (done === itemsToUpload.length) { if (failed > 0) { showError('Could not upload ' + failed + ' image(s). Remove the failed ones (red) or submit without them.' ); submitBtn.disabled = false; submitBtn.textContent = 'Submit report'; } else { doSubmit(selected.value); } } }); }); }); }); function doSubmit(reason) { submitBtn.textContent = 'Sending…'; var uploadedUrls = imageItems .map(function(it) { return it.uploadedUrl; }) .filter(Boolean); var payload = { reason: reason, message: document.getElementById('reportMessage').value.trim(), post_slug: currentSlug, post_url: window.location.href }; if (uploadedUrls.length) payload.image_urls = uploadedUrls; fetch('/api/post-report', { method: 'POST', headers: { 'Content-Type': 'application/json', 'X-Requested-With': 'XMLHttpRequest' }, body: JSON.stringify(payload) }) .then(function(r) { return r.json(); }) .then(function(data) { if (data && data.ok) { markReported(currentSlug); alreadyReported = true; bodyEl.innerHTML = '✓ Thank you for your report.'; footer.hidden = true; setTimeout(function() { closeModal(); footer.hidden = false; hideSection(); }, 2000); } else { showError((data && data.message) ? data.message : 'Something went wrong. Please try again.'); submitBtn.disabled = false; submitBtn.textContent = 'Submit report'; } }) .catch(function() { showError('Connection failed. Please try again.'); submitBtn.disabled = false; submitBtn.textContent = 'Submit report'; }); } })();
Comments 0
Posting as Guest '; } return; } var normalizedItems = items.slice().reverse(); var html = normalizedItems.map(function(comment) { var replies = Array.isArray(comment.replies) ? comment.replies : []; var repliesHtml = replies.map(function(reply) { return '' + '' + '' + '' + '' + escapeHtml(reply.author_name) + '' + escapeHtml(reply.time) + '' + '
' + escapeHtml(reply.content) + '
' + '' + '' + '' + ''; }).join(''); return '' + '' + '' + '' + '' + escapeHtml(comment.author_name) + '' + escapeHtml(comment.time) + '' + '
May you like
' + escapeHtml(comment.content) + '
' + '' + '' + '' + '' + (repliesHtml ? '' + repliesHtml + '' : '') + ''; }).join(''); if (mode === 'prepend') { listEl.insertAdjacentHTML('afterbegin', html); return; } listEl.insertAdjacentHTML('beforeend', html); } async function loadComments(page, mode) { var query = new URLSearchParams({ post_slug: postSlug, page: String(page), per_page: String(perPage), }); var response = await fetch('/api/post-comments?' + query.toString(), { method: 'GET', headers: { 'Accept': 'application/json' } }); var data = await response.json().catch(function() { return {}; }); if (!response.ok || data.ok === false) { throw new Error((data && data.message) || 'Cannot load comments.'); } var pagination = data.pagination || {}; currentPage = Number(pagination.current_page || 1); lastPage = Number(pagination.last_page || 1); totalCountEl.textContent = String((data.post && data.post.comment_count) || pagination.total || 0); loadMoreBtn.classList.toggle('comment-box__hidden', currentPage >= lastPage); renderComments(data.comments || [], mode); } async function postComment(content, parentId, feedbackTarget, submitTarget) { var authorName = ensureName(false); if (!authorName) { var forced = ensureName(true); if (!forced) { throw new Error('Please enter your name first.'); } authorName = forced; } var payload = { post_slug: postSlug, post_url: window.location.href, author_name: authorName, content: content, }; if (parentId > 0) { payload.parent_id = parentId; } if (submitTarget) submitTarget.disabled = true; if (feedbackTarget) { feedbackTarget.textContent = 'Submitting...'; feedbackTarget.style.color = ''; } try { var response = await fetch('/api/post-comments', { method: 'POST', headers: { 'Content-Type': 'application/json', 'Accept': 'application/json' }, body: JSON.stringify(payload) }); var data = await response.json().catch(function() { return {}; }); if (!response.ok || data.ok === false) { throw new Error((data && data.message) || 'Cannot submit comment.'); } await loadComments(1, 'replace'); return true; } finally { if (submitTarget) submitTarget.disabled = false; } } form.addEventListener('submit', async function(event) { event.preventDefault(); var content = String(contentEl.value || '').trim(); if (!content) { setFeedback('Please enter comment content.', true); return; } submitBtn.disabled = true; setFeedback('Submitting...'); try { await postComment(content, 0); contentEl.value = ''; setFeedback('Comment submitted.'); } catch (error) { setFeedback(error.message || 'Cannot submit comment.', true); } finally { submitBtn.disabled = false; } }); listEl.addEventListener('click', function(event) { var replyBtn = event.target.closest('.comment-item__reply-btn'); if (replyBtn) { var row = replyBtn.closest('.comment-item'); if (!row) return; var formEl = row.querySelector('.comment-item__reply-form'); if (!formEl) return; listEl.querySelectorAll('.comment-item__reply-form').forEach(function(f) { if (f !== formEl) f.classList.add('comment-box__hidden'); }); formEl.classList.remove('comment-box__hidden'); var input = formEl.querySelector('textarea'); if (input) input.focus(); return; } var cancelBtn = event.target.closest('.comment-item__reply-cancel'); if (cancelBtn) { var rf = cancelBtn.closest('.comment-item__reply-form'); if (!rf) return; rf.classList.add('comment-box__hidden'); var rInput = rf.querySelector('textarea'); var rFeedback = rf.querySelector('.comment-item__reply-feedback'); if (rInput) rInput.value = ''; if (rFeedback) rFeedback.textContent = ''; } }); listEl.addEventListener('submit', async function(event) { var replyForm = event.target.closest('.comment-item__reply-form'); if (!replyForm) return; event.preventDefault(); var row = replyForm.closest('.comment-item'); if (!row) return; var parentId = Number(row.getAttribute('data-comment-id') || 0); var input = replyForm.querySelector('textarea'); var submit = replyForm.querySelector('.comment-item__reply-submit'); var feedback = replyForm.querySelector('.comment-item__reply-feedback'); var replyText = String((input && input.value) || '').trim(); if (!replyText) { if (feedback) { feedback.textContent = 'Please enter reply content.'; feedback.style.color = '#dc2626'; } return; } try { await postComment(replyText, parentId, feedback, submit); // setFeedback('Reply submitted.'); } catch (error) { if (feedback) { feedback.textContent = error.message || 'Cannot submit reply.'; feedback.style.color = '#dc2626'; } } }); changeNameBtn.addEventListener('click', function() { ensureName(true); }); loadMoreBtn.addEventListener('click', async function() { if (currentPage >= lastPage) return; loadMoreBtn.disabled = true; try { await loadComments(currentPage + 1, 'prepend'); } catch (error) { setFeedback(error.message || 'Cannot load more comments.', true); } finally { loadMoreBtn.disabled = false; } }); ensureName(false); loadComments(1, 'replace').catch(function(error) { setFeedback(error.message || 'Cannot load comments.', true); }); })();