Semantic-Org/Semantic-UI-React

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

Open

#2,765 建立於 2018年5月5日

在 GitHub 查看
 (8 留言) (0 反應) (0 負責人)JavaScript (13,136 star) (4,065 fork)batch import
enhancementhelp wanted

描述

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.

貢獻者指南