繁体   English   中英

锚点上的AngularStrap弹出框

[英]AngularStrap popover on anchor

我想使用AngularStrap Popover从文本元素触发弹出框。 是否可以从锚点触发弹出窗口? 还是span元素之类的?

这有效:

<button content="hello" trigger="focus" bs-popover>clickme</button>

但这不是:

<a href="" content="hello" trigger="focus" bs-popover>clickme</a>
<span href="" content="hello" trigger="focus" bs-popover>clickme</span>
<label href="" content="hello" trigger="focus" bs-popover>clickme</label>
<small href="" content="hello" trigger="focus" bs-popover>clickme</small>

我找不到如何做到这一点的例子,它既不是锚点,也不是可行的办法。 (span元素也可以使用其他lablelike元素,但没有按钮...)对我来说,这似乎是一个非常愚蠢的问题,但是我真的找不到合适的答案:/

非常感谢!

问题是trigger='focus'适用于可聚焦元素; 按钮是可聚焦的,锚点和跨度不是。 尝试trigger='hover'trigger='click'您可以检查我的监听器: http ://plnkr.co/edit/4oi1ucgQa6zqhQSlVhzu

尝试像这样在锚标签上设置标签索引:

<a tabindex="0" href="" content="hello" trigger="focus" bs-popover>clickme</a>

讨论这种分析点击/侧重于不同的浏览器锚标记。

暂无
暂无

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

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