Skip to content

Commit 1f8abb3

Browse files
committed
Fix panel state toggling
1 parent f916477 commit 1f8abb3

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

micro_files/plugin-search.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,10 @@ function toggleElement (el, state) {
151151

152152
function togglePanelState (el, { expand = false }) {
153153
const tabpanel = el.querySelector('[role="tabpanel"]');
154-
tabpanel && tabpanel.classList.toggle('in', expand);
154+
if (!tabpanel) return;
155+
tabpanel.classList.toggle('in', expand);
156+
if (expand) tabpanel.style.height = '';
157+
tabpanel.setAttribute('aria-expanded', expand);
155158
}
156159

157160
async function fetchJson (url) {

web_modules/plugin-search.bundle.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)