Click on Top Level Menu Only Fires Dropdown and Not the Link

Permalink Browser Info Environment
I am having an issue with the menu system of this theme. When there are links that have child pages (dropdown), the dropdown menu does not fire on hover, but only on a click. When you click the top level link, you only get the dropdown menu and can no longer get to the page. I am on a Windows 10 computer with touchscreen, using Chrome. Also tested in Firefox and Edge and have the same issue. Once a menu item has a dropdown item, you can no longer get to that page by clicking, it only fires the dropdown menu.

Beta Site:https://www.btlaunch.com/elm/index.php/...

Type: Ticket
Status: Archived
darrellgw
View Replies:
pilipala replied on at Permalink Reply
pilipala
Hi

This theme uses a Bootstrap menu, which has this behaviour by default, and this is to make it more accessible for mobile and touch devices.

The Achillea documentation explains the menu on page 5. You can find the documentation in your theme folder, and also online:

https://www.concrete5.org/marketplace/themes/achillea/documentation/...

We would recommend keeping the default Bootstrap menu style, but if you need to have the top link of a dropdown "clickable" then you will need to customise the theme, or switch to a different theme.

If you search on the internet for "bootstrap parent link navigable" you will find there are various tips on customising the Bootstrap menu, such as here:

https://stackoverflow.com/questions/19935480/bootstrap-3-how-to-make...

https://github.com/mrhanlon/twbs-dropdown-doubletap/blob/master/js/d...

For example, you could add this javascript to your footer.php before the </body> tag, which would make the parent link "clickable":

<script>
$('li.dropdown').on('click', function() {
    var $el = $(this);
    if ($el.hasClass('open')) {
        var $a = $el.children('a.dropdown-toggle');
        if ($a.length && $a.attr('href')) {
            location.href = $a.attr('href');
        }
    }
});
$(function() {
        $(".dropdown").hover(
            function(){ $(this).addClass('open') },
            function(){ $(this).removeClass('open') }
        );


Thanks,

Jennifer
darrellgw replied on at Permalink Reply
darrellgw
Thanks Jennifer, I did ad the code block that you provided to the end of the footer.php page, and that made the top level menu operate correctly. However, now the sub menus cannot be accessed. When I hover then try to move my cursor to the sub-menu, it disappears before you can actually get there. The only way is to move your mouse as fast as possible and sometime
you get lucky and get on the sub menu. Is there a timing setting that can be extended so they don't disappear so quickly? Please advise. Thank you.
pilipala replied on at Permalink Reply
pilipala
Hi,

You will probably need to customise the CSS if you wish to change the behaviour of the default menu that comes with this theme.

While logged into your site, click on the cog icon (top left of the dashboard) > Design > Customise. Then scroll down to the bottom on the left panel until you see "Custom CSS". Click on the cog icon next to Custom CSS, add your own CSS and click save.

For example, if you adjust the position of the dropdown, I think it may work better for you. The code below provides the CSS that you would use to adjust the position, but you may need to change the position to suit.

div.ccm-page #achillea-main-nav .dropdown-menu {
    top: 66px;
}

We don't provide support for theme customisations, so you may want to test this in different browsers and devices, and adjust the CSS to get the effect that you want.

Thanks,

Jennifer
darrellgw replied on at Permalink Reply
darrellgw
Yes, that worked quite nicely. Thank you for your quick responses!
pilipala replied on at Permalink Reply
pilipala
Great, thank you for letting us know :)
ConcreteCMS replied on at Permalink Reply
ConcreteCMS
Attention: Since there has been no activity on this issue for two weeks, this issue has been automatically archived.

To re-open this issue, reply to this message.
ConcreteCMS replied on at Permalink Reply
ConcreteCMS
Attention: Since there has been no activity on this issue for two weeks, this issue has been automatically archived.

To re-open this issue, reply to this message.

concrete5 Environment Information

# concrete5 Version
Core Version - 8.3.2
Version Installed - 8.3.2
Database Version - 20180122213656

# concrete5 Packages
Achillea (0.9.6)

# concrete5 Overrides
None

# concrete5 Cache Settings
Block Cache - On
Overrides Cache - On
Full Page Caching - Off
Full Page Cache Lifetime - Every 6 hours (default setting).

# Server Software
Apache/2.4.29 (Unix) mod_hive/6.6 OpenSSL/1.0.1e-fips mod_fastcgi/2.4.6

# Server API
cgi-fcgi

# PHP Version
7.0.30

# PHP Extensions
bcmath, bz2, calendar, cgi-fcgi, Core, ctype, curl, date, dba, dom, enchant, exif, fileinfo, filter, ftp, gd, gettext, gmp, hash, iconv, imap, intl, ionCube Loader, json, ldap, libxml, mbstring, mcrypt, memcached, mysqli, mysqlnd, openssl, pcntl, pcre, PDO, pdo_mysql, pdo_pgsql, pdo_sqlite, pgsql, Phar, posix, pspell, readline, Reflection, session, shmop, SimpleXML, soap, sockets, SPL, sqlite3, standard, sysvmsg, sysvsem, tidy, tokenizer, wddx, xml, xmlreader, xmlrpc, xmlwriter, xsl, Zend OPcache, zip, zlib

# PHP Settings
max_execution_time - 45
log_errors_max_len - 1024
max_file_uploads - 20
max_input_nesting_level - 64
max_input_time - 60
max_input_vars - 1000
memory_limit - 512M
post_max_size - 32M
sql.safe_mode - Off
upload_max_filesize - 24M
ldap.max_links - Unlimited
memcached.sess_lock_max_wait - 0
mysqli.max_links - 60
mysqli.max_persistent - Unlimited
pcre.backtrack_limit - 1000000
pcre.recursion_limit - 100000
pgsql.max_links - 60
pgsql.max_persistent - Unlimited
session.cache_limiter - <i>no value</i>
session.gc_maxlifetime - 7200
soap.wsdl_cache_limit - 5
opcache.max_accelerated_files - 2000
opcache.max_file_size - 0
opcache.max_wasted_percentage - 5

Browser User-Agent String

Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.139 Safari/537.36

Hide Post Content

This will replace the post content with the message: "Content has been removed by an Administrator"

Hide Content

Request Refund

You may not request a refund that is not currently owned by you.