themesberg / themesberg/flowbite

Popover will close when changing focus within it

Open
#489 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
HTML
Stars
9.4k
Forks
862
PR merge metrics
No merged PRs in 30d

Description

Describe the bug
If you have a datepicker in a click activated popover, the popover will remain open when selecting a date, and when using one direction arrow to change the month (good), but will close if you click the left arrow then the right, or the right then the left. Changing directions for the month arrows closes the parent popover.

To Reproduce
Steps to reproduce the behavior:

  1. Go to https://jsfiddle.net/dxpbzy7L/
  2. Click on the button
  3. Within the popup, click the right arrow as many times as you want
  4. Click the left arrow and the popover closes

Expected behavior
The parent popover should remain open regardless of which or how many clicks on the month selector arrows.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the focus-change behavior using the linked JSFiddle, following the listed month-arrow steps inside a click-activated popover. Trace the popover and datepicker focus handling to determine why changing arrow direction closes the parent; done means the popover remains open for either direction and repeated clicks.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, tailwindcss
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.