Skip to content

How the menu item is goes hidden #44146

Closed
@abdallah-elqwatly

Description

@abdallah-elqwatly

Steps to reproduce

The menu item container is hidden but the box is still on but the container still takes up space on the page and when used in a conversation with multiple messages, each message has its own menu with message interactions like edit, delete etc so all the messages I have to scroll to have a menu and hence take up space on the page and when I try to do overflow:hidden to prevent all menus from coming out of a particular container I can't do it because the menus are located directly inside the tag and there is a solution to this problem that I have tried which is to show and hide the menus via
display: none
and not
visibility: hiddin

display: none => not reserve a place on the page
The element will not allocate space on the page and will not be visible

visibility: hiddin => reserve a place on the page
The element allocates space on the page but is not visible

Current behavior

The menu item container is hidden but the box is still on but the container still takes up space on the page and when used in a conversation with multiple messages, each message has its own menu with message interactions like edit, delete etc so all the messages I have to scroll to have a menu and hence take up space on the page and when I try to do overflow:hidden to prevent all menus from coming out of a particular container I can't do it because the menus are located directly inside the tag and there is a solution to this problem that I have tried which is to show and hide the menus via
display: none
and not
visibility: hiddin

display: none => not reserve a place on the page
The element will not allocate space on the page and will not be visible

visibility: hiddin => reserve a place on the page
The element allocates space on the page but is not visible

Expected behavior

No response

Context

solution to this problem that I have tried which is to show and hide the menus via display: none and not visibility: hidden display: none => not reserve a place on the page The element will not allocate space on the page and will not be visible visibility: hiddin => reserve a place on the page The element allocates space on the page but is not visible

Your environment

npx @mui/envinfo
  Don't forget to mention which browser you used.
  Output from `npx @mui/envinfo` goes here.

Search keywords: visibility:hidden on menuItem

Metadata

Metadata

Assignees

No one assigned

    Labels

    component: menuThis is the name of the generic UI component, not the React module!status: waiting for authorIssue with insufficient information

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions