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


The following commit(s) were added to refs/heads/ms12_conversion_of_md_files by 
this push:
     new 7ce7e3917a fixed clicking of submenus
7ce7e3917a is described below

commit 7ce7e3917a07036619dc16e1956f7b7264de4528
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