Skip to content

[BUG] when you select clickable and events: click you cant click element inside, without closing tooltip #978

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
hernandiazz9 opened this issue Mar 9, 2023 · 6 comments · Fixed by #979
Labels

Comments

@hernandiazz9
Copy link

Describe the bug
A clear and concise description of what the bug is.

Version of Package
vX.X.X

To Reproduce
Steps to reproduce the behavior

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information if possible or delete this section):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]
  • Frameworks [e.g. React 18, Next.js 13]

Smartphone (please complete the following information if possible or delete this section):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]
  • Frameworks [e.g. React 18, Next.js 13]

Additional context
Add any other context about the problem here.

@gabrieljablonski
Copy link
Member

As you can see on the example in the docs page, it should work fine. Can you provide a sample project showing the problem?

@hernandiazz9
Copy link
Author

Yes, when you open when hover, you can click great, the problem is when you set the events={[click]} and prop clickable, when you click a button the popover close.

@hernandiazz9
Copy link
Author

hernandiazz9 commented Mar 9, 2023

try this up.

<a id="not-clickable">◕‿‿◕</a>
<Tooltip events={['click']} anchorSelect="#not-clickable">
  <button>You cant click me :(</button>
</Tooltip>
<a id="clickable">◕‿‿◕</a>
<Tooltip
  events={['click']}
  anchorSelect="#clickable"
  clickable
>
  <button>You can click me!</button>
</Tooltip>

@gabrieljablonski
Copy link
Member

You're right, I misread your description. Try out the beta release for #979 with the version [email protected] and let us know if it works as expected.

By the way, this PR also deprecates events and introduces a new prop openOnClick, which I recommend you use instead.

@hernandiazz9
Copy link
Author

Yeah!! it's working! with this PR [email protected]

@gabrieljablonski
Copy link
Member

Good to know. The issue will be closed when the PR gets merged. Thanks for reporting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants