Skip to content

Commit 51a8829

Browse files
committed
Fixed
1 parent fb7f342 commit 51a8829

2 files changed

Lines changed: 11 additions & 2 deletions

File tree

docs/website/app.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,9 @@ const ContactPanel = (() => {
268268
toggle.setAttribute("aria-expanded", "false");
269269
}
270270
if (popover) {
271+
popover.classList.remove("is-open");
271272
popover.hidden = true;
273+
popover.setAttribute("aria-hidden", "true");
272274
}
273275
if (openContainer === container) {
274276
openContainer = null;
@@ -294,14 +296,18 @@ const ContactPanel = (() => {
294296
return;
295297
}
296298

299+
popover.classList.remove("is-open");
297300
popover.hidden = true;
301+
popover.setAttribute("aria-hidden", "true");
298302
toggle.setAttribute("aria-expanded", "false");
299303

300304
toggle.addEventListener("click", (event) => {
301305
event.preventDefault();
302-
const shouldOpen = popover.hidden;
306+
const shouldOpen = !popover.classList.contains("is-open");
303307
closeOpen();
308+
popover.classList.toggle("is-open", shouldOpen);
304309
popover.hidden = !shouldOpen;
310+
popover.setAttribute("aria-hidden", shouldOpen ? "false" : "true");
305311
toggle.setAttribute("aria-expanded", shouldOpen ? "true" : "false");
306312
openContainer = shouldOpen ? container : null;
307313
});

docs/website/styles.css

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,10 +151,13 @@ code {
151151
background: rgba(10, 1, 1, 0.97);
152152
box-shadow: 0 18px 42px rgba(0, 0, 0, 0.35);
153153
padding: 9px 10px;
154-
display: grid;
154+
display: none;
155155
gap: 6px;
156156
z-index: 1200;
157157
}
158+
.topbar-contact-popover.is-open {
159+
display: grid;
160+
}
158161
.topbar-contact-popover[hidden] {
159162
display: none !important;
160163
}

0 commit comments

Comments
 (0)