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.

[Tooltip] onOpen / onClose unexpected behaviour

See original GitHub issue
  • The issue is present in the latest release.
  • I have searched the issues of this repository and believe that this is not a duplicate.

Current Behavior 😯

When hovering on different targets within the Tooltip children, it triggers onOpen rather than trigger it only if open was changed to true.

Expected Behavior 🤔

I would expect the onOpen and onClose to trigger only when the open state is actually changed.

Steps to Reproduce 🕹

See codesandbox for both the reproduction of the bug and also a workaround I’m using for now: https://codesandbox.io/s/mui-tooltip-onopen-onclose-bug-txk0u

Tech Version
Material-UI v4.11.0

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
brorlarsnicklascommented, Nov 11, 2020

Is it ok if I give this a try? 😃

1reaction
oliviertassinaricommented, Nov 9, 2020

@dvh91 OK, this sounds like something we can handle at the same time.

Read more comments on GitHub >

github_iconTop Results From Across the Web

[Tooltip] onOpen / onClose unexpected behaviour #23450
When hovering on different targets within the Tooltip children, it triggers onOpen rather than trigger it only if open was changed to true...
Read more >
reactjs - Material-UI Tooltip automatically opens (displays ...
You can fix this by explicitly controlling the open state of the Tooltip using the open , onOpen , and onClose properties. onOpen...
Read more >
React Tooltip component - Material UI - MUI
Tooltips display informative text when users hover over, focus on, or tap an element. ... <Tooltip open={open} onClose={handleClose} onOpen={handleOpen} ...
Read more >
Datepicker Widget - jQuery UI API Documentation
'Unexpected literal at position nn' if format indicated a literal value that is not then found; 'Invalid date' if the date is invalid,...
Read more >
Tooltip | Components - BootstrapVue
Tooltips can be triggered (opened/closed) via any combination of click , hover and focus . The default trigger is hover focus . Or...
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