Skip to content

Commit

Permalink
Fixed the focus of the dropdown menu items in the top bar menu
Browse files Browse the repository at this point in the history
  • Loading branch information
vamera committed Jan 28, 2025
1 parent ed20de3 commit 49dde7b
Show file tree
Hide file tree
Showing 13 changed files with 15 additions and 13 deletions.
4 changes: 2 additions & 2 deletions source/_themes/wazuh_doc_theme_v3/src/js-source/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,14 @@ if ( typeof(versions) === 'undefined' ) {
if ($(this).closest('.dropdown').hasClass('show')
&& toElement !== $(this).siblings()[0]) {
e.stopPropagation();
$(this).trigger('click');
$(this).trigger('click').trigger('blur');
}
});
$('.navbar-nav .dropdown-menu').on('mouseleave', function(e) {
let toElement = e.toElement || e.relatedTarget;
if ($(this).closest('.dropdown').hasClass('show')
&& toElement !== $(this).siblings()[0]) {
$(this).siblings().trigger('click');
$(this).siblings().trigger('click').trigger('blur');
}
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ header {
background-color: $light-color-base-space;
.nav-link {
color: $light-color-main-text;
&.active,
&:hover,
&:focus {
color: $light-color-primary;
Expand Down Expand Up @@ -134,6 +135,7 @@ header {
background-color: $dark-color-index-header-background;
.nav-link {
color: $dark-color-main-text;
&.active,
&:hover,
&:focus {
color: $dark-color-primary;
Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
<a class="nav-link" href="https://cti.wazuh.com/" target="_blank" rel="noreferrer noopener">CTI</a>
</li>
<li class="nav-item">
<a class="nav-link" href="{{ theme_wazuh_doc_url + '/current/index.html' }}">Documentation</a>
<a class="nav-link active" href="{{ theme_wazuh_doc_url + '/current/index.html' }}">Documentation</a>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="dropdown-services" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Services<b class="caret d-inline d-sm-none"></b><svg class="d-none d-sm-inline"><use xlink:href="#menu-chevron" /></svg></a>
Expand Down

0 comments on commit 49dde7b

Please sign in to comment.