Semantic-Org/Semantic-UI-React

RFC: Popup more intuitive behavior with multiple `on` events

开放

#2,765 创建于 2018年5月5日

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

仓库指标

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

描述

Bug Report

The problem happens when using multiple events to trigger Popup. Can be reproduced with <Popup trigger={<button>Show tooltip</button>} content='tooltip' on={['click', 'hover']} but the easiest way is with <Popup trigger={<button>Show tooltip</button>} content='tooltip' on={['click', 'focus']}. Just try clicking the button. For the first time, it opens the popup and immediately closes it. Following clicks work correctly. This problem has been mentioned in #2075 by @austinfox here.

Steps

  1. Go to Semantic UI React Popup demo.
  2. Edit e.g. first example Popup component to contain multiple on events i.e. on={['click', 'focus']}.
  3. Click the popup trigger.

Expected Result

Popup is displayed and stays open.

Actual Result

Popup is displayed and closed immediately.

Version

0.80.0

Testcase

Check the steps section above.

贡献者指南