Semantic-Org/Semantic-UI-React

Dropdown: When clicking to close a dropdown, it fires "click" and "blur" events

开放

#2,641 创建于 2018年3月13日

 (8 条评论) (0 个反应) (0 位负责人)JavaScript (4,065 个派生)batch import
bughelp wanted

仓库指标

星标
 (13,136 个星标)
PR 合并指标
 (PR 指标待抓取)

描述

This issue happens when controlling manually (via states) the status of a dropdown.

Steps

If you click the "Not ok button" to close the drop-down you will notice that it triggers the click and blur events (It shouldn't fire blur cause I'm still inside the component).

Now, if you click the "ok button" repeatedly, you will notice that only the click event is fired, regardless if the dropdown is opening or closing, and the blur happens only when you actually click outside of the related button, as expected.

Expected Result

When clicking the "not ok button" to close a drop-down, it should fire only a click event.

Actual Result

When clicking the "not ok button" to close a drop-down, it fires a click and blur event.

Version

0.78.3 OS: High Sierra

Testcase

https://codesandbox.io/s/3q781mpvw1

贡献者指南