From 134d388ba09a426a652d5f0480115f31fbf33456 Mon Sep 17 00:00:00 2001 From: yetone Date: Wed, 7 Oct 2026 02:32:53 +0800 Subject: [PATCH] =?UTF-8?q?gui:=20a=20call's=20JSON=20tree=20keeps=20its?= =?UTF-8?q?=20keyboard=20focus=20styles=20in=20Safari=20before=2015.4=20?= =?UTF-8?q?=E2=80=94=20:focus-visible=20goes=20in=20rules=20of=20its=20own?= =?UTF-8?q?=20(old-webkit=20failed=20on=205b9b9c9b's=20.jt-fold=20and=20.j?= =?UTF-8?q?t-copy=20selector=20lists,=20which=20those=20Safaris=20drop=20w?= =?UTF-8?q?hole,=20hover=20included)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit old-webkit passes; json-tree passes in Chromium and WebKit. --- internal/gui/assets/app.css | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/internal/gui/assets/app.css b/internal/gui/assets/app.css index 1012a533..753f0d52 100644 --- a/internal/gui/assets/app.css +++ b/internal/gui/assets/app.css @@ -1795,7 +1795,9 @@ body.window .ag-sk-icon { width: 22px; height: 22px; border-radius: 6px; } .jt-fold { display: inline-block; width: 0; height: 1em; overflow: visible; white-space: nowrap; vertical-align: -.15em; } .jt-fold svg { display: inline-block; margin-left: -12px; color: var(--faint); transition: transform .12s; } .jt-fold.open svg { transform: rotate(90deg); } -.jt-fold:hover svg, .jt-fold:focus-visible svg { color: var(--fg); } +.jt-fold:hover svg { color: var(--fg); } +/* :focus-visible in a rule of its own: in a list, Safari before 15.4 drops the whole rule */ +.jt-fold:focus-visible svg { color: var(--fg); } .jt-key { color: var(--tk-f); cursor: copy; } .jt-key:hover { text-decoration: underline dotted; text-underline-offset: 2px; } .jt-copy { display: inline-block; width: 0; height: 1em; overflow: visible; white-space: nowrap; vertical-align: -.2em; opacity: 0; } @@ -1804,7 +1806,8 @@ body.window .ag-sk-icon { width: 22px; height: 22px; border-radius: 6px; } .jt-copy.done svg { color: var(--green); } /* faded, not hidden, so the pointer on its way across the gap to it still finds it there */ -.jt-head:hover > .jt-copy, .jt-copy:focus-visible, .jt-copy.done { opacity: 1; } +.jt-head:hover > .jt-copy, .jt-copy.done { opacity: 1; } +.jt-copy:focus-visible { opacity: 1; } .jt-kids[hidden], .jt-sum[hidden] { display: none; } .jt-sum { color: var(--muted); border-radius: 3px; } .jt-sum:hover { background: var(--pill-hover); color: var(--fg); }