Sub context menu goes off the page if content of sub-menu is large and doesn't fit at page bottom #15678
Labels
Status: Needs Triage
Issue will be reviewed by Core Team and a relevant label will be added as soon as possible
Describe the bug
When context menu is called on an element located at the bottom of the page and this context menu has a large sub-context menu then this context menu goes below the page instead of being flipped.
I have found out that in primeng-contextmenu.mjs we have a class ContextMenuSub, there in function position(sublist) sublist.style.top = '0px'; is hardcoded i.e. sub menu will start from click position and goes below, there is no logic for flip calculation (as we have it in class ContextMenu for function position() )
Environment
angular 17.0.5
primeng 17.17.0
node 21.7.2
windows 10
Reproducer
https://stackblitz.com/edit/hjxyqy-cza1aw
Angular version
17.0.5
PrimeNG version
17.17.0
Build / Runtime
Angular CLI App
Language
TypeScript
Node version (for AoT issues node --version)
21.7.2
Browser(s)
Chrome 124, Firefox 124
Steps to reproduce the behavior
I created a stackbliz for reproduction:
Expected behavior
whole sub-menu being rendered in upper direction (flipped horizontally) so that all 6 entries are visible
The text was updated successfully, but these errors were encountered: