This is an automated email from the ASF dual-hosted git repository.

grobmeier pushed a commit to branch ms12_conversion_of_md_files
in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git

commit 5bedbcafcec00ceab9910a9d47d6bbb5909d10a9
Author: Christian Grobmeier <[email protected]>
AuthorDate: Tue Mar 5 14:23:20 2024 +0100

    fixed clicking of submenus
---
 src/asciidoc/templates/document.html.erb | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/asciidoc/templates/document.html.erb 
b/src/asciidoc/templates/document.html.erb
index 81e8aaef16..8e066ea184 100644
--- a/src/asciidoc/templates/document.html.erb
+++ b/src/asciidoc/templates/document.html.erb
@@ -245,6 +245,11 @@
 
         for (var i = 0; i < menuItems.length; i++) {
             menuItems[i].addEventListener('click', function(event) {
+                // check if the sub menu was clicked
+                if (event.target.closest('.menu-drop-down')) {
+                    return;
+                }
+
                 var subMenu = this.getElementsByClassName('menu-drop-down')[0];
                 if (subMenu.style.display === 'flex') {
                     subMenu.style.display = 'none';

Reply via email to