Site logo

Archived topic

How to disable detecting touch on some mobile menu keys?

3 replies · Started by Julien on February 18, 2022

Viewing posts 1–4 of 4

Hi,

Some titles (keys) in my menu have no link (https://f731-0b0de530024d.wptiger.fr/) but have a sub-menu. On caneva menu, just arrow is (normally) allow to expand sub-menu. If you click on the title (key without link) then you close the cavena menu. It's not good for UX especially for clumsy fingers like I have :)

How to make the title behave like the arrow?

Thank you in advance for your reply,

Julien

Hi there,

try this CSS:

.slideout-navigation.main-navigation .main-nav ul li a:not([href]) {
    position: relative;

}

.slideout-navigation.main-navigation .main-nav ul li a:not([href]) .dropdown-menu-toggle {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    text-align: right;
}

NOTE: This works because it uses this: a:not([href]) to target links that do not have a URL : )

Bingo!

Merci beaucoup !!!

Glad to be of help!

This archived topic is closed to new replies.