Fix copy ticket button not working in Edge on Job Details page

Moved clipboard functions (copyToClipboard, fallbackCopy, showCopyFeedback)
inside IIFE scope for proper closure access. Edge browser is stricter than
Firefox about scope resolution - functions must be in same scope as event
listeners that call them.

Previously these functions were in global scope while event listeners were
in IIFE scope, which worked in Firefox but failed silently in Edge.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
Ivo Oskamp 2026-02-12 11:52:32 +01:00
parent 9dee9c300a
commit 2e0baa4e35
2 changed files with 55 additions and 54 deletions

View File

@ -284,6 +284,9 @@
.replace(/'/g, "&#39;");
}
(function () {
var currentRunId = null;
// Cross-browser copy to clipboard function
function copyToClipboard(text, button) {
// Method 1: Modern Clipboard API (works in most browsers with HTTPS)
@ -338,9 +341,6 @@
}, 800);
}
(function () {
var currentRunId = null;
function apiJson(url, opts) {
opts = opts || {};
opts.headers = opts.headers || {};

View File

@ -6,6 +6,7 @@ This file documents all changes made to this project via Claude Code.
### Fixed
- Fixed tickets not being displayed in Run Checks modal detail view (Meldingen section) by extending `/api/job-runs/<run_id>/alerts` endpoint to include both run-specific tickets (via ticket_job_runs) and job-level tickets (via ticket_scopes), ensuring newly created tickets are visible immediately in the modal instead of only after being resolved
- Fixed copy ticket button not working in Edge browser on Job Details page by moving clipboard functions (copyToClipboard, fallbackCopy, showCopyFeedback) inside IIFE scope for proper closure access (Edge is stricter than Firefox about scope resolution)
## [2026-02-10]