primefaces / primevue

Next Generation Vue UI Component Library
https://primevue.org
MIT License
10.28k stars 1.21k forks source link

ContextMenu: Y axis collision detection not working for submenus #6348

Open m1keyboy opened 1 month ago

m1keyboy commented 1 month ago

Describe the bug

When using the ContextMenu component that contains nested items, the displayed submenu does not perform collision detection on the Y axis. It looks like some improvements were recently attempted here - https://github.com/primefaces/primevue/commit/cba43b310b75be1d6e437ca3b532fd41b4ba4946#diff-c6ca045bcd1ffaee382f973a803ba6be86a152e0cb4c07780b955e047d79fc0c - but that appears to only be concerned with the X axis.

Reproducer

https://stackblitz.com/edit/primevue-4-vite-issue-template-ccakui?file=src%2FApp.vue

PrimeVue version

4.0.5

Vue version

4.x

Language

TypeScript

Build / Runtime

Vite

Browser(s)

Chrome 128.0.6613.115

Steps to reproduce the behavior

  1. Goto https://stackblitz.com/edit/primevue-4-vite-issue-template-ccakui?file=src%2FApp.vue
  2. Right click near the bottom of the viewport
  3. Expand the 'Speech' item

Expected behavior

Submenus within the ContextMenu component should also perform collision detection on the Y axis. Where possible, if a submenu is going to collide with the top/bottom edge of the viewport, the submenu orientation should flip.

LukeGarrigan commented 1 week ago

Getting this too

daledev-uk commented 1 week ago

This is becoming a real problem for our users, any updates?