@devchitchat/chat 4.4.1 → 4.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@devchitchat/chat",
3
- "version": "4.4.1",
3
+ "version": "4.4.2",
4
4
  "description": "A small chat app. p2p video and screenshare.",
5
5
  "scripts": {
6
6
  "dev": "bun --watch index.js",
@@ -502,7 +502,6 @@ export default function CallIsland(root) {
502
502
  const threadRepliesEl = document.getElementById('thread-replies')
503
503
  const threadInputEl = document.getElementById('thread-input')
504
504
  const threadSendBtn = document.getElementById('thread-send')
505
- const threadCloseBtn = document.getElementById('thread-panel-close')
506
505
 
507
506
  let activeThreadParentId = null
508
507
 
@@ -553,8 +552,10 @@ export default function CallIsland(root) {
553
552
  if (threadRepliesEl) threadRepliesEl.innerHTML = ''
554
553
  }
555
554
 
556
- // Wire all close buttons (top header + bottom mobile button)
557
- document.querySelectorAll('.thread-panel-close').forEach(btn => btn.addEventListener('click', closeThread))
555
+ // Use delegation so both the top and the mobile footer "Close thread" button work
556
+ threadPanelEl?.addEventListener('click', e => {
557
+ if (e.target.closest('.thread-panel-close')) closeThread()
558
+ })
558
559
 
559
560
  function sendThreadReply() {
560
561
  const text = threadInputEl?.value.trim()