themesberg / themesberg/flowbite

Modal is closed when click didn't initiate outside of content

Open
#1,012 2 comments 1 reaction 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

When you click in the modal and release the click outside of it, the modal is still closed. That happend quite often when you have small modal and you go fast to select text.

They are multiple framework that suffer the same issue:

https://stackoverflow.com/questions/55732804/modal-is-closed-when-cursor-is-released-outside-the-modal-after-chrome-update-a
https://stackoverflow.com/questions/56633589/prevent-modal-from-closing-when-click-didnt-initiate-outside-of-content

sandbox : https://plnkr.co/edit/mxDLAdnrQ4p0KKyw?p=info

Expected behavior
When you click inside the modal and release the click outiside, the modal shouldn't close.

MyLl4

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

Start by reproducing the behavior in the linked Plunker sandbox and inspect the modal's outside-click handling in the Flowbite source. Verify the fix against the reported drag or text-selection interaction; done means releasing outside after a click that began inside no longer closes the modal.

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
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.