Skip to content
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

Click popover bug #242

Closed
jjagielka opened this issue Aug 15, 2022 · 4 comments
Closed

Click popover bug #242

jjagielka opened this issue Aug 15, 2022 · 4 comments
Assignees
Labels
enhancement New feature or request v1.6.3 Issues and tasks for v1.6.3 release

Comments

@jjagielka
Copy link

Describe the bug
Popover does not disappear correctly.

To Reproduce
Steps to reproduce the behavior.

Case 1

  1. Go to 'Popover > Triggering'
  2. Click on button 'Click popover'
  3. Click on button 'Click popover' again
  4. Popover doesn't disappear

Case 2

  1. Go to 'Popover > Triggering'
  2. Click on button 'Click popover'
  3. Click on popover body
  4. Click outside
  5. Popover doesn't disappear

Expected behavior
In both above cases popover should disappear.

@zoltanszogyenyi
Copy link
Member

Hello @jjagielka,

Thanks for reporting - I'll test this myself out and provide an update for the v1.6.0 release.

@zoltanszogyenyi zoltanszogyenyi added enhancement New feature or request v1.6.3 Issues and tasks for v1.6.3 release labels Dec 7, 2022
@jjagielka
Copy link
Author

I have implemented those at https://flowbite-svelte.com/components/popover#Triggering so you can compare.

@zoltanszogyenyi
Copy link
Member

Hey @jjagielka,

I've fixed the issue (9610965) when you click outside the popover component not closing. On the other hand, I would argue against toggling the visibility of the popover when clicking on the trigger element - the reason for this is because we also show it when clicking AND focusing it, meaning that even if you click it one, twice, or three times the element is still focused.

This in comparison with the dropdown component where we actually toggle the visibility of the dropdown is different because we don't show the dropdown menu when focusing the button, but only when there's an explicit action of opening it by hitting "ENTER" for keyboards or by clicking it via the mouse.

The Popover is different compared to the Dropdown from this POV - if you want to use the toggle functionality you can just use the Dropdown component instead - otherwise there would be no substantial difference between the two other than how we describe it and how the examples look.

Cheers,
Zoltan

@abellee
Copy link

abellee commented May 18, 2024

if Click outside of browser Popover doesn't disappear, is this right?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request v1.6.3 Issues and tasks for v1.6.3 release
Projects
None yet
Development

No branches or pull requests

3 participants