简体   繁体   English

在平板电脑上无法单击Foundation Top Bar /菜单垂直下拉菜单

[英]Foundation Top Bar / Menu Vertical Dropdown not clickable on Tablets

I'm using Foundation 6.2.4 for my current project and just stumbled upon an issue with the dropdown-behavior in top-bar. 我在当前项目中使用的是Foundation 6.2.4,但偶然发现top-bar中的下拉行为存在问题。

If visited via tablet the dropdown-links in top-bar open and show their subitems just as expected, but the subitems are not clickable. 如果通过平板电脑访问,则顶部栏中的下拉链接将打开并按预期显示其子项,但这些子项不可单击。 Instead, the dropdown disappears and nothing happens. 相反,下拉列表消失了,什么也没有发生。 On Desktop behaviour is just as expected and everthing is working fine. 在桌面上,行为符合预期,一切正常。

You can have a look at this behaviour in the Foundation Docs: http://foundation.zurb.com/sites/docs/top-bar.html Just set your inspector to emulate a mobile device - eg iPad and try to click on of the subitems of "One". 您可以在“基础文档”中查看此行为: http : //foundation.zurb.com/sites/docs/top-bar.html只需将检查器设置为模拟移动设备(例如iPad),然后尝试单击“一个”的子项目。

Would be great to have some ideas how to make this work as expected on tablets as well. 希望有一些想法也可以使这款产品在平板电脑上达到预期的效果。

Thanks in advance! 提前致谢! Frank 坦率

基础文档:顶部栏和下拉菜单(垂直菜单)

Apparently this bug was reported 28 days ago and will be fixed in Foundation 6.3. 显然,此错误是28天前报告的,将在Foundation 6.3中修复。 In the meantime, you can read about the issue and a temporary fix here: https://github.com/zurb/foundation-sites/issues/9293 同时,您可以在此处阅读有关此问题和临时修复的信息: https : //github.com/zurb/foundation-sites/issues/9293

The fix: 解决方法:

The 'click' event is being fired when you touch any of the submenu items. 当您触摸任何子菜单项时,都会触发“点击”事件。 You can temporarily work around it by adding a data-close-on-click-inside="false" attribute to the dropdown menu. 您可以通过在下拉菜单中添加data-close-on-click-inside =“ false”属性来暂时解决此问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM