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

Scroll doesn't follow active item #223

Open
mikaelboff opened this issue Feb 22, 2021 · 0 comments · May be fixed by #224
Open

Scroll doesn't follow active item #223

mikaelboff opened this issue Feb 22, 2021 · 0 comments · May be fixed by #224

Comments

@mikaelboff
Copy link

Describe the bug
I've set a max-height and overflow:auto to the ul element, so I can have scroll on the context menu. When i have too much items in the context menu and i navigate with arrowUp or arrowDown keys, the scroll doesn't follow the active item

To Reproduce
Steps to reproduce the behavior:

  1. add the following css to the application:
.cdk-overlay-pane.ngx-contextmenu ul {
    max-height: 234px;
    overflow: auto;
}
  1. Open a context menu with too much items (40 or 50)
  2. Press successively arrowDown key until the active item gets hiden
  3. You will notice that the scroll doesn't move, and the active item is not visible

Expected behavior
It's expected that the scroll should move together when the active item is not more visible on the screen

Stackblitz Example
Please fork this base example to demonstrate the issue you're experiencing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant