From 7d39ea4dd88195a3a8b4794a96def2879d7596aa Mon Sep 17 00:00:00 2001 From: Eric Wagoner Date: Wed, 24 Dec 2025 10:49:45 -0500 Subject: [PATCH] Fix visibility check for elements in fixed-position modals MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit offsetParent returns null for elements inside position:fixed containers. Use getComputedStyle instead to check display and visibility. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- index.html | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/index.html b/index.html index 4eb9d48..c341616 100644 --- a/index.html +++ b/index.html @@ -1186,7 +1186,9 @@ function getFocusableElements(container) { const elements = container.querySelectorAll('button, input:not([type="hidden"]), select, textarea, [tabindex]:not([tabindex="-1"])'); return Array.from(elements).filter(el => { - return el.offsetParent !== null && !el.disabled; + if (el.disabled) return false; + const style = window.getComputedStyle(el); + return style.display !== 'none' && style.visibility !== 'hidden'; }); }