We're evolving to serve you better! This current forum has transitioned to read-only mode. For new discussions, support, and engagement, we've moved to GitHub Discussions.

Bug in dropdown menu in Mercury template on Safari on iPad

  • #10697
    Avatar photo[anonymous]

    On iPad (Air, both 4th and 5th gen), the dropdown menu (in landscape, regular menu, non mobile) on my website under ‘Gallery’ does not pop up when tapping, it only shows up when pressing and holding ‘Gallery’. Then it also doesn’t go away when tapping outside of it.

    This happens in Safari, but not in Firefox.

    I used the Mercury template, but the strange thing is that the menu works fine on the Mercury demo website in Safari.

    I don’t think I’ve changed anything in the css that would cause this, and it still happens when I disable the template-override file. Does anyone know why this happens and if it can be fixed?

    Avatar photo[anonymous]

    If someone can help me I would be super grateful, I really can’t figure out why this happens on my website but not on the demo. I’ve tried removing all the custom css but that doesn’t help. I can’t have part of my site inaccessible on a common device.

    I took a look at the Publii showcase sites and this one has the exact same issue, on iPad in Safari I can’t open the submenus unless I press and hold.

    Avatar photo[anonymous]

    I have found the problem, when the search is disabled there is no Event Listener ‘Click’. When I enable the search (even though I don’t have search installed), it works perfectly.

    Now I don’t know javascript, I just found this by using the Chrome inspector on the is-separator and saw that on my site under ‘Event Listeners’ the click was missing versus on the demo site, then when I click on the javascript it goes to code called searchOverlay.addEventListener. How can this be fixed if I don’t want search enabled?

    Avatar photo[anonymous]

    I have fixed it for now by leaving the search enabled and hiding the button with display:none, but I’m sure there’s a better way. It should probably be fixed in the javascript.