Semantic-Org/Semantic-UI-React

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

Open

#2.765 geöffnet am 5. Mai 2018

Auf GitHub ansehen
 (8 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)JavaScript (4.065 Forks)batch import
enhancementhelp wanted

Repository-Metriken

Stars
 (13.136 Stars)
PR-Merge-Metriken
 (Keine gemergten PRs in 30 T)

Beschreibung

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.

Contributor Guide