Skip to content

OutlinedInput without label has break in outline due to legend in fieldset #37216

Closed

Description

@SCjona

Duplicates

  • I have searched the existing issues

Latest version

  • I have tested the latest version

Steps to reproduce 🕹

Open this in Firefox (Current Firefox version v157) https://stackblitz.com/edit/github-mj4fjwcd (Updated)

Basically create a TextField (variant outlined) or OutlinedInput without label and zoom in (better visible when focused)

Current behavior 😯

image
Visible break in outlined due to legend

Expected behavior 🤔

image
No label => No legend => No break in outline

Context 🔦

I upgraded from MUI v4. MUI v4 did not have this issue as the legend had a fixed width of 0.01px set.

Your environment 🌎

npx @mui/envinfo
  System:
    OS: Linux 6.1 Arch Linux
  Binaries:
    Node: 19.9.0 - /usr/bin/node
    Yarn: Not Found
    npm: 8.19.2 - /usr/bin/npm
  Browsers:
    Chrome: Not Found
    Firefox: 112.0.2 <-- used

Activity

  1. michaldudak commented on May 9, 2023

    @michaldudak
    Member

    I can confirm - the gap is visible in Firefox (on Windows, in my case). On Chrome the border looks fine.

  2. added
    type: bugIt doesn't behave as expected.
    and removed on May 9, 2023
  3. removed their assignment
    on May 9, 2023
  4. DarshanDixit05 commented on May 9, 2023

    @DarshanDixit05

    Hi 👋, I wanted to work on this issue. Can you please assign it to me?

  5. misyel commented on May 24, 2023

    @misyel

    I'd like to pick up this issue if it's still available!

  6. ZeeshanTamboli commented on May 25, 2023

    @ZeeshanTamboli
    Member

    Please feel free to create a PR.

  7. mj12albert commented on Apr 13, 2026

    @mj12albert
    Member

    Is this still an issue? I don't see it in v9 (MacOS Firefox, Chrome, Safari) https://stackblitz.com/edit/dk2ndjfk?file=src%2FDemo.tsx

    This could work as a workaround:

    <OutlinedInput sx={{ '& fieldset > legend': { maxWidth: 0 } }} />
  8. added
    has workaroundThere’s a bug, but users have a complete workaround, so no urgent fix or release is needed.
    and removed on Apr 13, 2026
  9. SCjona commented on Apr 14, 2026

    @SCjona
    Author

    Yes the gap still shows at 500% zoom (Linux Firefox 149.0.2). The legend element has a calculated width of 0.15px.

    Image

    After adding the workaround it's gone.

    Also works fine without workaround on Chrome (calculated width = 0px). So this is probably a Firefox specific issue.

  10. ZeeshanTamboli commented on Oct 26, 2026

    @ZeeshanTamboli
    Member

    Yes it's a Firefox browser specific issue. Updated the issue description.

  11. github-actions commented on Oct 26, 2026

    @github-actions
    Contributor

    This issue has been closed. If you have a similar problem but not exactly the same, please open a new issue.
    Now, if you have additional information related to this issue or things that could help future readers, feel free to leave a comment.


    @SCjona Thanks again for creating this issue! If you have a moment, we would love to hear your thoughts on how we handled it with this short feedback form.

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

    browser: FirefoxAffects or fixes behavior in Mozilla Firefox.has workaroundThere’s a bug, but users have a complete workaround, so no urgent fix or release is needed.scope: text fieldChanges related to the text field.type: bugIt doesn't behave as expected.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions