Skip to content

bug: <select> inside dropdown closes immediately when opened #4537

Closed as not planned

Description

@tuomastik

Reproduction URL (Required)

https://play.tailwindcss.com/TKeEADvBTZ

What version of daisyUI are you using?

v5.5.20

Which browsers are you seeing the problem on?

Chrome, Chrome Android, Edge

Describe your issue

Bug

<select> inside a daisyUI dropdown closes immediately when opened on Chrome, not on Firefox.

Reproduction

Playground URL: https://play.tailwindcss.com/TKeEADvBTZ

<div class="dropdown bg-base-300">
  <div tabindex="0" role="button" class="btn btn-ghost">Open menu</div>
  <ul tabindex="-1" class="dropdown-content menu w-64 bg-base-200 p-4">
    <li>
      <select class="select w-full">
        <option selected>Organization A</option>
        <option>Organization B</option>
        <option>Organization C</option>
      </select>
    </li>
  </ul>
</div>

Steps to reproduce

  1. Open the reproduction.
  2. Click the dropdown trigger.
  3. Click the native <select> inside the dropdown.
  4. The dropdown closes immediately, so the select cannot be used.

Expected behavior

The native <select> should stay usable inside the dropdown so the user can choose an option.

Actual behavior

When the native <select> is clicked, the dropdown closes immediately.

Related docs

Activity

  1. github-actions commented on May 29, 2026

    @github-actions

    Thank you @tuomastik for reporting issues. It helps daisyUI a lot 💚
    I'll be working on issues one by one. I will help with this one as soon as a I find a solution.
    In the meantime providing more details and reproduction links would be helpful.

  2. pdanpdan commented on May 29, 2026

    @pdanpdan
    Contributor

    Do not use a focus controlled drop-down.
    When opening the select the drop-down loses focus.
    User some other type of drop-down

  3. FranRDev commented on Jun 1, 2026

    @FranRDev

    Same bug, it used to work.

  4. PabacoDev commented on Jun 1, 2026

    @PabacoDev

    I have the same bug. It works perfectly in browsers that use the Firefox engine.
    Will there be a solution?

  5. pdanpdan commented on Jun 1, 2026

    @pdanpdan
    Contributor

    Do not use a focus controlled drop-down. When opening the select the drop-down loses focus. User some other type of drop-down

    Either this or use an unstyled select https://daisyui.com/components/select/#using-os-native-style-for-the-options-dropdown

    But first solution is the normal one

  6. saadeghi commented on Jun 1, 2026

    @saadeghi
    Owner

    I wouldn't suggest putting a select in a dropdown. It's not a good user experience. User opens a dropdown and inside the dropdown there's another dropdown basically...
    In this case i would suggest radio inputs inside the dropdown. It would be way easier for the user.
    Or if it needs to be a select, don't put it in a dropdown.

    Please let me know if you have any questions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions