From f182eec0b1f02f9012ff85ec93a51a1431833d8b Mon Sep 17 00:00:00 2001 From: johnnyq Date: Thu, 27 Aug 2026 23:26:29 -0400 Subject: [PATCH] Fix content area flashing blank on every client page - defer the client delete modal's script so it stops blocking the parser mid-body --- agent/modals/client/client_delete.php | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/agent/modals/client/client_delete.php b/agent/modals/client/client_delete.php index bd4c8efd3..027d205d0 100644 --- a/agent/modals/client/client_delete.php +++ b/agent/modals/client/client_delete.php @@ -17,4 +17,18 @@ - + sits in the middle of the body, between the client + header card and the page's own content. Without defer the HTML parser + stops here until the file arrives - and it arrives late, queued behind + the whole footer bundle the speculative preload scanner has already + started fetching - so the chrome paints and the content area below + stays blank for the duration. Measured on vendors.php?client_id=1: + document complete at 105ms, this script at 175ms, content painted at + 219ms. That ~100ms hole is the flash. + + defer is safe here: validateClientNameDelete() is only ever called + from the onkeyup handler above, and a deferred script is guaranteed to + have run before DOMContentLoaded, long before anyone can type. */ ?> +