|
@@ -413,6 +413,15 @@
|
|
|
}
|
|
|
} // methods
|
|
|
)
|
|
|
+ // close open navbar dropdowns when user clicks elsewhere
|
|
|
+ var details = [...document.querySelectorAll('details')];
|
|
|
+ document.addEventListener('click', function(e) {
|
|
|
+ if (!details.some(f => f.contains(e.target))) {
|
|
|
+ details.forEach(f => f.removeAttribute('open'));
|
|
|
+ } else {
|
|
|
+ details.forEach(f => !f.contains(e.target) ? f.removeAttribute('open') : '');
|
|
|
+ }
|
|
|
+})
|
|
|
</script>
|
|
|
|
|
|
|