Skip to content

Commit

Permalink
fix: Solved that click the parent element of secondary menu to jump
Browse files Browse the repository at this point in the history
  • Loading branch information
liuyib committed Dec 10, 2019
1 parent 22a425f commit ae083e4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
5 changes: 4 additions & 1 deletion layout/_mixins/menu-item.pug
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@ mixin menuItem(menu)
- isSubMenu = true

div.header-nav-menu-item
a(href=menuPath ? menuPath : "#").header-nav-menu-item__a
a.header-nav-menu-item__a(
href=isSubMenu ? "javascript:;" : menuPath
class=isSubMenu ? "nopointer" : ""
)
if !theme.menu_settings.text_only && !!menuIcon
i(class=`${fa_prefix} fa-${menuIcon}`)
if !theme.menu_settings.icon_only
Expand Down
4 changes: 4 additions & 0 deletions source/css/_common/scaffolding/utils.styl
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
clearfix();
}

.nopointer {
pointer-events: none;
}

// UI components
// ----------------------------------------
popover-bg-color = alpha(#000, .7);
Expand Down

0 comments on commit ae083e4

Please sign in to comment.