question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Popup: when on="hover" with a mouseEnterDelay, a click should not show the popup before delay

See original GitHub issue

Steps

Using the hover example here - https://react.semantic-ui.com/modules/popup#popup-example-hover, modify it to add a mouseEnterDelay like so:

const PopupExampleHover = () => (
  <Popup
    trigger={<Button icon='add' content='Add a friend' />}
    content='Sends an email invite to a friend.'
    on='hover' mouseEnterDelay={5000}
  />
)

Expected Result

If you enter the button, click it and move off of it, all before 5000ms, the popup should not show up.

Actual Result

The popup shows up immediately on click regardless of delay. The problem here is that Popup is often used to show additional helpful information and for a person that knows the UI, it can get very annoying to have it pop up all the time.

Version

0.80.0

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:2
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
levithomasoncommented, May 6, 2018

This is a little confusing as our docs for inherited props are not clear. The props for configuring the popup’s open/close behavior come from the underlying portal props.

Note, the mouse enter delay is the delay before allow the mouseenter event to open the popup.:

mouseEnterDelay  {number}  Milliseconds to wait before opening on mouse over

https://react.semantic-ui.com/addons/portal

What you are describing would be a mouseClickDelay. I’m not sure this makes sense as the popup would open 5 seconds after the user clicked it. This could be problematic for many reasons.

You may be looking to disable open on click, openOnTriggerClick={false}. This way the popup only opens on mouse over after 5 seconds, but not when the user clicks the popup.

Hope that helps!

1reaction
theigorcommented, May 2, 2018

Also, I opened it in this project rather than the main semantic-ui project because it looks like the on and the mouseEnterDelay properties are specific to semantic-ui-react.

Thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Delay React onMouseOver event - javascript - Stack Overflow
Here's a way you can delay your event by 500ms using a combination of onMouseEnter , onMouseLeave , and setTimeout .
Read more >
Transition Delay Delays - CSS-Tricks
So you decide to go with some kind of popup that will show the command when the button is hovered. But mobile devices...
Read more >
How long should the delay be before a tooltip pops up?
Mouse cursor enters target area: display visual feedback within 0.1 seconds. Wait 0.3–0.5 seconds. If cursor remains stopped within target area, display ......
Read more >
rc-trigger@3.0.0 - base abstract trigger component for react
action, string[], ['hover'], which actions cause popup shown. enum of 'hover','click','focus','contextMenu'. mouseEnterDelay, number, 0, delay time to show ...
Read more >
Tooltip - Ant Design
A simple text popup tip. ... Tooltip will show on mouse enter. ... mouseEnterDelay, Delay in seconds, before tooltip is shown on mouse...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found