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 1f8abb3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
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
2 changes: 1 addition & 1 deletion web_modules/plugin-search.bundle.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 1f8abb3

Please sign in to comment.