Skip to content

Commit

Permalink
Added general JS to make Bulma dropdowns clickable
Browse files Browse the repository at this point in the history
  • Loading branch information
jorvis committed Dec 29, 2023
1 parent a4f446c commit d187404
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion www/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ <h3 class="mt-6 mb-3">
</div>
</div>

<div class="control dropdown is-right mr-0 is-hoverable">
<div class="control dropdown is-clickable is-right mr-0">
<div class="dropdown-trigger">
<button class="button" aria-haspopup="true" aria-controls="dropdown-menu6">
<span>Quick search using Gene Lists</span>
Expand Down
9 changes: 9 additions & 0 deletions www/js/common.v2.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,15 @@ document.addEventListener('DOMContentLoaded', () => {
});
});

// Bulma dropdowns can't be clicked without a wee bit of Javascript
document.querySelectorAll('.dropdown').forEach(item => {
item.addEventListener('click', function(event) {
event.stopPropagation();
item.classList.toggle('is-active');
});
});


// modal code from https://bulma.io/documentation/components/modal/

// Add a click event on various child elements to close the parent modal
Expand Down

0 comments on commit d187404

Please sign in to comment.