From 2e76e63ba23130c80c27ea75d1aa64f5c83b3ee8 Mon Sep 17 00:00:00 2001 From: Scarriffle Date: Wed, 17 Jun 2026 12:15:38 +0200 Subject: [PATCH] =?UTF-8?q?fix:=20event=20popup=20=E2=80=94=20allow=20tool?= =?UTF-8?q?bar=20button=20clicks=20and=20text=20selection=20while=20dragga?= =?UTF-8?q?ble?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 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 --- frontend/css/app.css | 2 +- frontend/js/calendar.js | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/frontend/css/app.css b/frontend/css/app.css index e057968..4b94dd0 100644 --- a/frontend/css/app.css +++ b/frontend/css/app.css @@ -1198,7 +1198,7 @@ a { color: var(--primary); text-decoration: none; } } .popup-icon-btn:active { transform: scale(.88); } -.popup-body { padding: 12px 16px 14px; display: flex; flex-direction: column; gap: 9px; } +.popup-body { padding: 12px 16px 14px; display: flex; flex-direction: column; gap: 9px; -webkit-user-select: text; user-select: text; } .popup-row { display: flex; align-items: flex-start; gap: 10px; font-size: 13px; line-height: 1.45; color: var(--text-2); } .popup-row-icon { width: 16px; height: 16px; flex-shrink: 0; margin-top: 1px; fill: var(--text-3); } #popup-time { color: var(--text-1); font-weight: 500; } diff --git a/frontend/js/calendar.js b/frontend/js/calendar.js index d3ff908..313548d 100644 --- a/frontend/js/calendar.js +++ b/frontend/js/calendar.js @@ -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);