Semantic-Org/Semantic-UI-React

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

オープン

#2,765 opened on 2018/05/05

 (8 件のコメント) (0 件のリアクション) (0 人の担当者)JavaScript (4,065 件のフォーク)batch import
enhancementhelp wanted

Repository metrics

Stars
 (13,136 個のスター)
PR merge metrics
 (PR metrics pending)

説明

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.

コントリビューターガイド