Skip to content

Commit

Permalink
Fix panel state toggling
Browse files Browse the repository at this point in the history
  • Loading branch information
vladimyr committed Feb 16, 2020
1 parent f916477 commit 6e8709d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion micro_files/plugin-search.js
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,10 @@ function toggleElement (el, state) {

function togglePanelState (el, { expand = false }) {
const tabpanel = el.querySelector('[role="tabpanel"]');
tabpanel && tabpanel.classList.toggle('in', expand);
if (!tabpanel) return;
tabpanel.classList.toggle('in', expand);
if (expand) tabpanel.style.height = '';
tabpanel.setAttribute('aria-expanded', expand);
}

async function fetchJson (url) {
Expand Down

0 comments on commit 6e8709d

Please sign in to comment.