Skip to content

Commit 6e8709d

Browse files
committed
Fix panel state toggling
1 parent f916477 commit 6e8709d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Diff for: 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) {

0 commit comments

Comments
 (0)