fix: event popup — allow toolbar button clicks and text selection while draggable

- Don't start a header drag when the pointer goes down on a button/link, so
  edit/copy/delete/close work again
- Make the popup body text selectable (user-select: text) for copying

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Scarriffle
2026-06-17 12:15:38 +02:00
parent 6e8efb2ed5
commit 2e76e63ba2
2 changed files with 4 additions and 1 deletions

View File

@@ -1465,6 +1465,9 @@ function showEventPopup(ev, anchor) {
};
dragHandle.onpointerdown = e => {
if (e.button !== 0) return;
// Let the toolbar buttons (edit/copy/delete/close) receive their click —
// only the bare header area starts a drag.
if (e.target.closest('button, a')) return;
dragOffX = e.clientX - popup.getBoundingClientRect().left;
dragOffY = e.clientY - popup.getBoundingClientRect().top;
dragHandle.setPointerCapture(e.pointerId);