[英]Prevent iron-select to be fired when click on element in iron-selector
我试图在iron-selector
内点击一个元素而不触发iron-select
事件。
<iron-selector selected="{{selected}}">
.... lot of content.
<a on-tap="_save">Save</a>
</iron-selector>
我希望在除<a></a>
之外的所有内容上触发iron-select
事件。
我尝试使用preventDefault
但这不起作用。
我无法将<a></a>
移出iron-selector
。
有任何想法吗? 非常感谢帮助。
您可以使用stopPropagation 。 这将防止事件冒泡到父元素。
event.stopPropagation()
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.