Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug - ContextSubMenuItem - Dropdown menu not being displayed correctly #270

Open
logonoff opened this issue Feb 3, 2025 · 0 comments · May be fixed by #271
Open

Bug - ContextSubMenuItem - Dropdown menu not being displayed correctly #270

logonoff opened this issue Feb 3, 2025 · 0 comments · May be fixed by #271

Comments

@logonoff
Copy link

logonoff commented Feb 3, 2025

Describe the problem
A clear and concise description of the problem. Which components are affected?

How do you reproduce the problem?
Provide steps to reproduce. A codesandbox demonstrating the problem is appreciated.

Nest a ContextSubMenuItem inside of a ContextMenu:

export const UncontrolledContextMenu = () => (
  <>
    <p>Dismiss the context menu by pressing `ESC` or clicking away.</p>
    <ContextMenu reference={{ x: 350, y: 250 }}>
      <ContextSubMenuItem label="parent">
        <DropdownItem label="a">a</DropdownItem>
        <DropdownItem label="a">b</DropdownItem>
      </ContextSubMenuItem>
    </ContextMenu>
  </>
);

Expected behavior
A clear and concise description of the expected behavior.

The ContextSubMenuItem dropdown menu shows up next to the already open one

Is this issue blocking you?
List the workaround if there is one.

yes. no workaround found just yet

Screenshots
If applicable, add screenshots to help explain the issue.

Image

Screencast.From.2025-02-03.16-57-40.mp4

What is your environment?

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Fedora 41, Firefox 134.0.2

What is your product and what release date are you targeting?
OCP Console 4.19

Any other information?
The ContainerNode for the popper is not being set correctly, so it defaults to document.body, which probably explains this bug

@github-project-automation github-project-automation bot moved this to Needs triage in PatternFly Issues Feb 3, 2025
@logonoff logonoff linked a pull request Feb 4, 2025 that will close this issue
7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Needs triage
Development

Successfully merging a pull request may close this issue.

1 participant