nexnews
Jul 07, 2026

PART 2 - Eight Years Later, I Returned for Christmas with the Four Children He Never Knew Were His - 9!001

Eight years after my husband abandoned me because I was pregnant, he invited me to Christmas dinner hoping to embarrass the "childless" ex-wife he thought had failed at life. He expected me to arrive alone, broken, and forgotten. Instead, I landed in a helicopter with the four children he never knew existed, and the look on his face was worth every painful year I survived without him.

The text arrived on a freezing December evening while I sat in my office overlooking downtown Austin.

Marcus Reynolds.

For a second, I thought I was seeing things.

Eight years had passed since the man who swore he would love me forever walked away the moment I told him I was pregnant. He called me a liar, filed for divorce before hearing a single heartbeat, changed his phone number, and disappeared from my life as if I had never mattered.

Now he wanted me to attend Christmas dinner.

I read the message three times.

"Come to Christmas dinner at Mom's house in Boulder on December 25. The family wants to see you one last time."

I laughed.

Not because it was funny, but because I knew exactly what he was planning.

Marcus still imagined I was the devastated twenty-five-year-old woman he had abandoned. He pictured me struggling, lonely, and desperate for acceptance. He had absolutely no idea what my life had become.

"Kesha?" my assistant, Dana, asked from my office doorway. "You're not actually thinking about going, are you?"

I looked out across the city lights and smiled.

"Oh, I'm definitely going."

Christmas morning arrived beneath a bright blue sky. The helicopter lifted above the Austin skyline carrying the four greatest blessings of my life.

"Mama, are we really meeting Grandpa today?" Noah asked.

"And Grandma?" Sophia added excitedly.

"Maybe," I answered, smiling.

Across from me sat two boys and two girls in matching holiday outfits. They were eight years old, full of life, and every one of them carried Marcus's eyes, his smile, and his unmistakable stubborn jaw.

The irony almost made me laugh.

The man who ran away from becoming a father had unknowingly become the father of quadruplets.

As the snow-covered mountains outside Boulder came into view, my heartbeat quickened. It wasn't fear anymore.

It was anticipation.

At exactly 11:47 a.m., the helicopter settled onto the lawn in front of Patricia Reynolds' house. Snow swirled through the air as the rotors slowed.

I stepped out first.

Then Noah.

Then Ethan.

Then Sophia.

Finally, Olivia.

Four beautiful children. Four living reminders of the family Marcus had abandoned before it even had a chance to begin.

The front door flew open.

Patricia appeared first.

The moment she saw the children, her eyes widened. A wineglass slipped from her hand and shattered across the floor.

Good.

Let them be shocked.

I gathered my children around me and asked softly, "Ready?"

They nodded together.

We walked to the front door as silence settled over the house.

Then I saw him.

Marcus looked older and heavier, but his confident smile vanished the instant his eyes landed on the children. Standing beside him was a blonde woman wearing a bright red dress and an engagement ring that sparkled beneath the Christmas lights.

His new fiancée.

Marcus stared at Noah.

Then Ethan.

Then Sophia.

Then Olivia.

His face turned ghost white as recognition slowly replaced confusion. The resemblance was impossible to ignore.

"Marcus..." the blonde whispered. "Who are those children?"

He couldn't answer.

I stepped inside the house and every conversation stopped.

"Merry Christmas," I said calmly.

No one moved.

No one even breathed.

I rested my hand on Olivia's shoulder, looked directly into the eyes of the man who had abandoned us, and quietly said, "I brought the grandchildren you never knew you had."

The engagement ring box slipped from Marcus's trembling hand.

His fiancée gasped.

Patricia staggered backward.

Then one of my children looked up at Marcus with a warm, innocent smile, opened their mouth to ask a single question... and the entire room froze before anyone could react.
PART 2 - Eight Years Later, I Returned for Christmas with the Four Children He Never Knew Were His -

“Are you my dad?”

Olivia asked it softly, without accusation, without fear, with the kind of innocent curiosity only a child could carry into a room full of adults who had forgotten how to breathe.

Marcus opened his mouth, but no sound came out.

Beside him, the blonde woman in the red dress pressed one hand against the back of a chair, her engagement ring catching the light as her face drained of color. Patricia stood near the broken glass, both hands pressed to her chest, staring at my children as if Christmas morning had split open and delivered a truth she had spent eight years refusing to imagine.

Noah moved closer to me. Ethan studied Marcus with cautious interest. Sophia’s eyes darted around the room, reading faces the way she always did when something felt strange. Olivia, still waiting for an answer, tilted her head.

I placed a gentle hand on her shoulder.

“That’s something the grown-ups need to talk about first,” I said.

Her brows drew together. “But he looks like Ethan when Ethan is mad.”

A nervous sound escaped someone in the room. Not laughter exactly. More like panic trying to disguise itself.

Marcus blinked, finally finding his voice. “Kesha.”

My name sounded foreign in his mouth after all these years.

“Marcus,” I replied.

Patricia took one shaky step forward. “Four?”

The word trembled in the air.

“Yes,” I said. “Four.”

Her eyes filled instantly. “You had four babies?”

“I had four children,” I corrected gently. “Babies grow.”

Something in her face collapsed at that. Not dramatically. Not for show. Just a quiet folding inward, like a woman suddenly realizing how much life had happened without her.

The blonde woman looked from me to Marcus. “You told me she lied.”

The room shifted.

Marcus swallowed. “Celeste, I—”

“You told me there was no child,” Celeste said. Her voice was low, careful, and far more dangerous than shouting. “You said she made it up to trap you.”

My children looked at me. Four pairs of eyes, confused by adult words they did not fully understand but could feel.

I kept my face calm for them.

“This conversation is not happening in front of the children,” I said.

Marcus’s father, Harold, appeared from the dining room doorway. He looked thinner than I remembered, his silver hair combed carefully, his Christmas sweater slightly crooked at the collar. He stared at the children, then at me, and his expression held something I had not expected.

Shame.

“Kesha,” he said quietly. “There’s a sitting room down the hall. The children can have cocoa there.”

“No,” Ethan said immediately.

I looked down.

His small jaw had tightened. That same jaw. Marcus’s jaw. “We came with Mom.”

“And you’re staying with me,” I assured him. “But grown-up conversations can be boring.”

Sophia whispered, “Or scary.”

I knelt in front of them, smoothing Olivia’s coat sleeve, brushing snow from Noah’s hair. “Nothing scary is going to happen. You are safe. You are loved. And we’re only staying as long as we choose to stay.”

Noah studied my face. He was the oldest by six minutes and acted as if that gave him responsibility for the others. “Promise?”

“Promise.”

A teenage girl I didn’t recognize stepped forward from behind the Christmas tree. She had Patricia’s eyes and a shy, uncertain smile. “I can take them. I’m Rachel. Their cousin, I guess.”

The words came out awkwardly, but kindly.

Patricia made a faint sound at “cousin,” as if the word had opened another door inside her.

I looked at Rachel. “Thank you.”

The children hesitated, then followed her toward the sitting room. Olivia looked back once at Marcus.

“You didn’t answer,” she said.

Marcus flinched.

When they were gone, the room exhaled.

Celeste turned toward Marcus fully. “I need the truth.”

He ran a hand down his face. “I didn’t know.”

I almost laughed, but there was no humor left in me. “You chose not to know.”

“That’s not fair.”

“No,” I said, my voice steady. “What wasn’t fair was changing your number after I sent you the first ultrasound. What wasn’t fair was having your lawyer tell mine you wanted no further contact. What wasn’t fair was calling me a liar before a doctor ever said a word.”

Patricia covered her mouth.

Marcus looked at his mother, then back at me. “I never got an ultrasound.”

The room went still again.

I stared at him. “What?”

“I never got one,” he said. “I got your voicemail. I got the message saying you were pregnant. I thought—”

“You thought I invented four children?” I asked.

“No. Back then I thought you invented one.”

Celeste’s eyes closed briefly.

Harold stepped forward. “Marcus.”

His tone held a warning.

I turned toward Harold. Something in his face made a cold thread pull through me. “What do you know?”

He looked at Patricia.

Patricia wouldn’t meet my eyes.

My heartbeat changed.

Eight years of carefully sealed pain shifted beneath my ribs. I had come prepared for Marcus’s shock, for embarrassment, for apologies that came too late, for questions my children deserved answers to. I had not come prepared for the feeling that the story I knew might not be complete.

“Patricia,” I said.

She looked older now. Not because of wrinkles or gray hair, but because guilt has a way of aging the eyes before the face.

“I thought I was protecting him,” she whispered.

Celeste stepped back as if she needed distance from all of us.

Marcus stared at his mother. “Protecting me from what?”

Patricia’s hands shook. “From making the same mistake twice.”

“Twice?” I asked.

Harold said her name again, softer this time, but she lifted a hand to stop him.

“No. It’s Christmas. And those children are in my house, and they should have been in my life. No more pretending.”

The fire snapped in the hearth.

Patricia looked at me then, truly looked at me, and for one brief moment I saw not the proud woman who had ignored my calls, not the mother-in-law who had once corrected how I folded napkins and pronounced French desserts, but someone frightened by her own choices.

“You sent a packet,” she said. “A medical packet. Ultrasound, doctor’s note, something from your attorney. It came here because Marcus had moved back home for a few weeks after you separated.”

My mouth went dry.

“I never saw it,” Marcus said.

“No,” Patricia whispered. “You didn’t.”

Celeste’s voice cut through the room. “Because you hid it?”

Patricia nodded once.

The sound that left Marcus was barely human. Not anger. Not grief. Something between them. “Mom.”

“I believed she was manipulating you,” Patricia said quickly, words spilling now. “You were upset. You were drinking too much. You had lost the Denver contract. You told me the marriage was already failing.”

“Our marriage was failing because he disappeared every time life got difficult,” I said.

Marcus looked at me then, and for once he did not defend himself.

Patricia continued, “I opened the envelope. I saw the ultrasound. I saw… I saw more than one heartbeat mentioned. I didn’t read carefully. I panicked.”

“You panicked,” I repeated.

“I called your old apartment,” she said. “You had already left. I told myself if it were real, you would come back. You would fight harder.”

The words landed quietly, but they struck something deep.

I thought of myself at twenty-five, swollen with four fragile lives, sleeping upright because breathing hurt, answering calls from creditors, building a business from a borrowed laptop while pretending I wasn’t terrified. I thought of hospital lights, tiny cries, incubators, my mother’s hands rubbing circles on my back before she died, and nights when I whispered to four cribs that I was sorry their father wasn’t there.

“You wanted a pregnant woman to fight harder for a family that had locked the door,” I said.

Patricia wept then. Silently. Completely.

Marcus turned away, gripping the mantel. “You let me believe there was no proof.”

“You wanted to believe it,” Harold said.

That brought Marcus around. “What does that mean?”

Harold’s jaw tightened. “It means your mother hid the envelope, but she didn’t make you cruel. She didn’t make you refuse Kesha’s calls. She didn’t make you sign divorce papers without meeting her face to face. She didn’t make you vanish.”

Marcus stared at him, stunned.

The house seemed to shrink around us. Christmas music played faintly from another room, cheerful and horribly out of place.

Celeste removed the ring from her finger.

Marcus noticed immediately. “Celeste, wait.”

She placed it on the side table, not dramatically, not with anger, but with devastating calm. “I’m not leaving because you have children. I’m leaving this room because I need to understand whether I was engaged to a man who made one terrible mistake or a man who built his life on avoiding truth.”

Then she turned to me. “I’m sorry. I know that doesn’t fix anything.”

“No,” I said. “But I appreciate it.”

She nodded, eyes shining, and walked toward the hallway.

Marcus looked as if every direction had become a locked door.

From the sitting room, laughter suddenly rose. Olivia’s bright giggle. Ethan’s lower chuckle. A child’s laugh can be merciful, but that morning it felt like a bell ringing over a battlefield everyone was pretending not to see.

Patricia turned toward the sound. “May I meet them?”

“No,” I said.

Her face crumpled.

“Not like this,” I added. “Not while everyone is overwhelmed and secrets are still falling out of the walls.”

She nodded quickly, wiping her cheeks. “Of course. Of course.”

Marcus took one step toward me. “Kesha, I need to see them.”

“You just did.”

“That’s not what I mean.”

“I know what you mean.”

His eyes were wet now, and I hated that part of me still recognized him beneath the years. The man who used to dance barefoot with me in the kitchen. The man who once cried during a documentary about lost dogs and denied it afterward. The man who kissed my forehead every morning before work until the mornings became colder and the kisses became rare.

But memory is not forgiveness. And regret is not repair.

“They know about you,” I said.

Marcus froze.

“I never told them you were dead. I never told them you were evil. I told them their father wasn’t ready to be part of our family, and that grown-ups sometimes make choices children can’t fix.”

He lowered his head.

Noah appeared in the hallway, cocoa mustache on his upper lip. “Mom?”

I turned instantly. “Yes, sweetheart?”

“Rachel says there’s a piano. Can Sophia play it?”

Sophia peeked from behind him, hopeful and nervous.

I smiled. “Ask the owner of the piano.”

Every adult looked at Patricia.

She wiped her eyes again. “Yes. Yes, of course. Please.”

Sophia slipped into the living room, small hands clasped in front of her velvet dress. She approached the upright piano near the window as though it were a sleeping animal. Patricia moved to lift the fallboard, but Sophia did it herself with careful confidence.

“What should I play?” she asked me.

“Whatever feels right.”

She sat, feet dangling above the pedals, and began “Silent Night.”

The first notes were tentative. Then stronger. Her gift had always been this quiet doorway into emotion. She played as snow drifted beyond the windows, as adults stood scattered among garlands and half-wrapped truths, as Marcus saw his daughter not as proof or consequence but as a person.

Olivia and Ethan came in next, followed by Rachel and Noah. My children gathered around the piano, singing softly, imperfectly, beautifully.

Patricia pressed a hand to her mouth. Harold sat down heavily in an armchair.

Marcus cried without sound.

I did not comfort him.

When the song ended, Sophia looked pleased with herself. “Was that okay?”

Harold’s voice broke. “That was wonderful.”

Ethan inspected the presents under the tree. “Are any of those for kids?”

Rachel laughed. “Actually, yes. Mine are too old for me now, but Grandma always buys extra.”

Patricia looked at me, asking permission without words.

I gave the smallest nod.

The next hour unfolded in careful pieces.

The children ate too many cookies. Rachel taught Noah a card trick. Ethan asked Harold about the model train circling the tree and received a full engineering explanation he seemed to enjoy more than the train itself. Olivia charmed Celeste, who had returned quietly and was sitting near the window with a mug of tea, her ring still absent but her kindness intact. Sophia played two more songs.

Marcus stayed near the edge of everything, watching like a man outside his own life.

Once, Ethan approached him.

“Do you like trains?” Ethan asked.

Marcus crouched slowly, as if sudden movements might scare him away. “I used to.”

“Why’d you stop?”

Marcus glanced at me.

I kept my expression neutral.

“I guess I forgot,” he said.

Ethan considered that. “That happens to adults.”

“It does.”

“You can remember again.”

Marcus looked at him for a long moment. “I’d like that.”

Ethan nodded, satisfied, and returned to the train.

It was such a small exchange. No grand reconciliation. No swelling music. Just a boy offering a man a simple truth without knowing its weight.

By two o’clock, the house had softened but not healed. Healing was too large a word for one afternoon. Still, something had shifted from performance to reality.

Patricia asked if the children could stay for dinner.

“No,” I said.

This time, Marcus spoke before his mother could. “Kesha’s right.”

Everyone turned to him.

He looked exhausted. “This is too much for them. For all of us.”

I was surprised enough to study him.

He met my eyes. “But may I ask for time? Not rights. Not demands. Just time to earn whatever you’re willing to allow.”

The old Marcus would have argued. He would have insisted that being their father gave him a place. He would have cared more about how things appeared than what they required. This Marcus looked like a man standing in the wreckage of himself, finally noticing the walls had fallen.

“I won’t make promises today,” I said.

“I understand.”

“No, you don’t. But maybe someday you will.”

He accepted that with a nod.

As I helped the children gather their coats, Patricia disappeared upstairs. When she returned, she held a small white envelope, yellowed at the edges. My name was written across the front in my own handwriting from eight years ago.

My body went cold.

“I kept it,” she said. “I don’t know why. Maybe because throwing it away felt worse.”

Marcus stared at the envelope as though it were alive.

Patricia held it out to me, but I didn’t take it immediately.

Inside that envelope was not just paper. It was the ghost of a younger woman begging to be believed.

Finally, I accepted it.

My fingers trembled despite everything I had built, everything I had survived. Success had taught me how to stand in rooms full of powerful people and never blink. Motherhood had taught me how to function on two hours of sleep and a breaking heart. But this envelope undid me in a quieter way.

I slipped it into my coat pocket.

Outside, the helicopter waited against the snow, its dark shape startling against the white lawn. The children said polite goodbyes. Olivia hugged Rachel. Noah shook Harold’s hand with solemn dignity. Sophia thanked Patricia for the piano, and Patricia looked as if those five words might live in her forever.

Marcus stood on the porch as the children climbed inside.

Olivia paused at the helicopter door. “Are we coming back?”

I looked at Marcus.

He did not speak. For once, he seemed to understand that the answer was not his to give.

“We’ll talk about it,” I told her.

She accepted that and climbed in.

Before I followed, Marcus said, “Kesha.”

I turned.

“I’m sorry.”

Snow gathered on his shoulders. His voice was rough, stripped of charm and defense.

I looked at the man who had broken my heart, the father my children had never known, the son of a woman whose fear had sharpened into cruelty, the almost-husband of a woman now reconsidering her future. I looked at him and felt many things.

Anger, yes.

Grief, certainly.

But also something unexpected. Not forgiveness. Not yet. Maybe not ever in the way people like to imagine it. But a loosening. A small space where the past no longer had its hand closed around my throat.

“I believe you’re sorry,” I said. “What you do with that will matter more.”

Then I climbed into the helicopter.

As we lifted above the lawn, the Reynolds house grew smaller beneath us. The children pressed their faces to the windows, waving. Patricia stood in the snow with both hands clasped beneath her chin. Harold raised one arm. Rachel waved wildly. Celeste stood apart from them, thoughtful and still.

Marcus did not wave.

He watched.

Back in Austin that evening, after baths and leftover gingerbread and four sleepy retellings of “the Christmas with the helicopter,” I tucked each child into bed.

Noah asked whether Marcus was really their father.

“Yes,” I said.

He absorbed that silently. “Was he scared of us?”

“No, sweetheart. I think he was scared of the truth.”

Ethan asked if Marcus could come see his science fair project someday.

“Maybe.”

Sophia asked if Grandma Patricia was sad because of her.

“No,” I said firmly. “Adults have feelings because of adult choices. Not because of children.”

Olivia, half asleep, asked, “Did he like us?”

I brushed curls from her forehead. “How could anyone not like you?”

She smiled and drifted off.

Only when the house was silent did I go to my bedroom and remove the envelope from my coat pocket.

For a long time, I simply sat with it.

The paper felt thin and fragile, but it had survived eight years hidden in a drawer in a house where my children should have opened birthday presents and lost teeth and tracked snow across the floor.

I opened it carefully.

The ultrasound photo slid out first.

There they were.

Four tiny shadows. Four miracles before they had names.

Behind it was the doctor’s note confirming a high-risk multiple pregnancy. Behind that, a copy of the letter my attorney had sent Marcus’s attorney, requesting communication regarding medical expenses and parental acknowledgment.

I remembered signing it. I remembered hoping it would force a conversation. I remembered receiving only silence.

Then another paper slipped free.

I frowned.

This one was not mine.

It was folded twice, the crease worn soft. At the top was the letterhead of Marcus’s old law firm. The date was eight years ago.

My breath slowed as I read.

Dear Mrs. Reynolds,

Per your request, this confirms that Mr. Marcus Reynolds has not been formally served with the enclosed medical documentation. No acknowledgment of paternity, financial responsibility, or custodial interest has been made at this time. Unless otherwise directed by Mr. Reynolds personally, no further action will be taken.

My hands tightened.

There was a handwritten note beneath it.

Patricia—this keeps him clear for now. But if Kesha ever asks for a copy of the delivery receipt, there may be a problem. You should speak with Daniel before this goes any further.

Daniel.

Marcus’s older brother.

The one person who had not been at Christmas dinner.

I read the name again, and the room seemed to tilt.

Daniel Reynolds had been Marcus’s attorney during our divorce. Daniel had signed every cold letter. Daniel had told my lawyer there would be no communication. Daniel had known there was medical documentation.

And Daniel had helped bury it.

My phone buzzed on the nightstand, making me jump.

A message from an unknown number appeared on the screen.

Kesha, it’s Celeste. I found something tonight after everyone left. I don’t think Marcus knows. I don’t think Patricia knows all of it either. Please call me before you speak to Daniel.

I stared at the message until the words blurred.

Down the hall, my children slept peacefully, unaware that the story of their beginning had just opened another door.

And somewhere in the past, someone had been holding the key.

END OF PART 2 - LIKE, SHARE AND COMMENT "THE ENTIRE STORY" IF YOU WANT TO READ THE FULL STORY

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(initials(reply.author_name)) + '' + '' + '' + escapeHtml(reply.author_name) + '' + escapeHtml(reply.time) + '' + '

' + escapeHtml(reply.content) + '

' + '' + '' + '' + ''; }).join(''); return '' + '' + '' + escapeHtml(initials(comment.author_name)) + '' + '' + '' + 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); }); })();

Other posts