themesberg / themesberg/flowbite-react

Modal content is truncated at the top on medium displays with long content

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

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
2.1k
Forks
506
PR merge metrics
No merged PRs in 30d

Description

Describe the bug
Modal content is truncated at the top on medium displays with long content

To Reproduce

I have the following modal:

<Modal show={true} onClose={onClose}>
  <Modal.Header>Header</Modal.Header>
  <Modal.Body>
    <ol className='list-decimal'>
      <li>List item</li>
      <li>List item</li>
      <li>List item</li>
      <li>List item</li>
      <li>List item</li>
      <li>List item</li>
      <li>List item</li>
      <li>List item</li>
      <li>List item</li>
      <li>List item</li>
      <li>List item</li>
      <li>List item</li>
      <li>List item</li>
      <li>List item</li>
      <li>List item</li>
      <li>List item</li>
      <li>List item</li>
      <li>List item</li>
      <li>List item</li>
      <li>List item</li>
      <li>List item</li>
      <li>List item</li>
      <li>List item</li>
      <li>List item</li>
      <li>List item</li>
      <li>List item</li>
      <li>List item</li>
      <li>List item</li>
      <li>List item</li>
      <li>List item</li>
      <li>List item</li>
      <li>List item</li>
      <li>List item</li>
      <li>List item</li>
      <li>List item</li>
      <li>List item</li>
      <li>List item</li>
      <li>List item</li>
      <li>List item</li>
      <li>List item</li>
      <li>List item</li>
      <li>List item</li>
      <li>List item</li>
      <li>List item</li>
      <li>List item</li>
    </ol>
  </Modal.Body>
  <Modal.Footer>
    <Button color='gray' onClick={onClose}>
      Cancel
    </Button>
    <Button onClick={onSave}>Save</Button>
  </Modal.Footer>
</Modal>

On small screens, it displays fine, however on larger screens (md or greater), the top of the modal is truncated.

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

Screenshots
Small screen:

image

Medium screen or greater (note, this is scrolled all the way to the top):

image

Project information:

  • Tailwind: 3.2.6
  • Flowbite: 1.6.3
  • Flowbite React: 0.3.8
  • Type: Nextjs

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 locating the Modal component used by the provided JSX and reproduce the long-content case at small and md-or-greater widths with the listed Tailwind, Flowbite, and Flowbite React versions. Investigate why the modal’s top content is clipped, then verify that the header and long body remain reachable while the footer stays usable at both viewport sizes.

Written by the indexing model from the issue text.

Assessment

Tech stack
nextjs, react, tailwindcss, typescript
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.