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

Component: ContextMenu is not aligned properly when the document is scrolled #12011

Closed
Hapcy opened this issue Oct 5, 2022 · 0 comments · Fixed by #12012
Closed

Component: ContextMenu is not aligned properly when the document is scrolled #12011

Hapcy opened this issue Oct 5, 2022 · 0 comments · Fixed by #12012
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Milestone

Comments

@Hapcy
Copy link

Hapcy commented Oct 5, 2022

Describe the bug

If the document is scrolled and we try to open a contextmenu which is too big to open at the cursor then the contextmenu gets aligned outside of the viewport.
See attached stackblitz.

Environment

Latest Angular and Primeng in chrome or firefox.

Reproducer

https://stackblitz.com/edit/github-qspcge?file=src%2Fapp%2Fapp.component.html,src%2Fstyles.scss

Angular version

14.x.x

PrimeNG version

14.x.x

Build / Runtime

Angular CLI App

Language

TypeScript

Node version (for AoT issues node --version)

14.18.3

Browser(s)

No response

Steps to reproduce the behavior

Reproduction steps are available in stackblitz.

Expected behavior

ContextMenu should appear as if the document wasn't scrolled or at least it should not get aligned outside of viewport.

@Hapcy Hapcy added the Type: Bug Issue contains a bug related to a specific component. Something about the component is not working label Oct 5, 2022
Hapcy pushed a commit to Hapcy/primeng that referenced this issue Oct 5, 2022
@cetincakiroglu cetincakiroglu added this to the 14.2.2 milestone Nov 15, 2022
cetincakiroglu added a commit that referenced this issue Nov 15, 2022
Fix #12011: align contextmenu properly when body is scrolled
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants