避免不得不双击切换引导下拉 [英] Avoid having to double-click to toggle Bootstrap dropdown
问题描述
我使用的是引导下拉菜单。问题是,它永远不会滴下来后,第一次点击;我需要点击两次才能被触发。我猜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屋!