避免不得不双击切换引导下拉 [英] Avoid having to double-click to toggle Bootstrap dropdown

查看:157
本文介绍了避免不得不双击切换引导下拉的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用的是引导下拉菜单。问题是,它永远不会滴下来后,第一次点击;我需要点击两次才能被触发。我猜click事件以某种方式得到传播下来之前停留的地方...

I am using a Bootstrap dropdown menu. The problem is that it never drops down upon the first click; I need to click 2 times for it to be toggled. I guess the click event is somehow getting stuck somewhere before propagating down...

有没有办法解决呢?

推荐答案

如果有人用角与 UI-引导模块正常引导HTML下拉定义一起,有还需要两次点击。

If someone is using angular with ui-bootstrap module along with normal bootstrap HTML dropdown definition, there are also two clicks needed.

<li class="dropdown">
   <a href="#" class="dropdown-toggle" data-toggle="dropdown">Dropdown</a>
   [...]
</li>

=>删除数据切换=下拉菜单将解决这个问题。

打开下拉与点击后会这方面的工作。

Opening the dropdown with one click will work after this.

参考:
<一href=\"https://github.com/angular-ui/bootstrap/issues/2294\">https://github.com/angular-ui/bootstrap/issues/2294

这篇关于避免不得不双击切换引导下拉的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆