mui / mui/material-ui

[Popper] Placeholder text from `TextField` is appearing inside `Popper`

Open
#33,730 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

component: Popper scope: popup
Dominant language
JavaScript
Stars
99.1k
Forks
32.5k
Avg merge
2d 17h
Merged PRs (30d)
106

Description

Duplicates
  • I have searched the existing issues
Latest version
  • I have tested the latest version
Current behavior 😯

When a Popper component is displayed above an TextField component, the place holder text of TextField is appearing inside the Popper.

Expected behavior 🤔

No content of the TextField component should appear on the Popper when Popper displays above TextField.

Steps to reproduce 🕹

Live Example: https://codesandbox.io/s/determined-black-85vufb?file=/demo.js

Steps:

  1. Make sure the Popper displays above a TextField
  2. Click on "Toggle Popper" button to display Popper.
  3. See that placeholder text of TextField being displayed inside the Popper.
Context 🔦

I am trying to display a Popper to help the user when filling a form thus the issues with Popper and TextField.

Your environment 🌎
npx @mui/envinfo
  System:
    OS: Linux 5.18 undefined
  Binaries:
    Node: 18.7.0 - /usr/bin/node
    Yarn: 1.22.19 - /usr/bin/yarn
    npm: 8.15.1 - /usr/bin/npm
  Browsers:
    Chrome: Not Found
    Firefox: 103.0
  npmPackages:
    @emotion/react: ^11.9.3 => 11.9.3 
    @emotion/styled: ^11.9.3 => 11.9.3 
    @mui/base:  5.0.0-alpha.91 
    @mui/icons-material: ^5.8.4 => 5.8.4 
    @mui/material: ^5.9.2 => 5.9.2 
    @mui/private-theming:  5.9.1 
    @mui/styled-engine:  5.8.7 
    @mui/system:  5.9.2 
    @mui/types:  7.1.5 
    @mui/utils:  5.9.1 
    @types/react:  18.0.15 
    react: ^18.2.0 => 18.2.0 
    react-dom: ^18.2.0 => 18.2.0 
    typescript:  4.7.4 

I used Firefox. The issue is same with chromium based browsers.

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 with the linked CodeSandbox's demo.js and reproduce the issue with Popper displayed above TextField in Firefox or Chromium. Trace the Popper and TextField behavior in the Material UI source, then add or update coverage so the placeholder no longer appears inside the Popper.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.