Problem with Menu

UI Components for React
Post Reply
kaho29
Posts: 18
Joined: 18 Aug 2017, 10:57

24 Apr 2018, 14:36

I stumbled upon a little problem with the Menu component, when you use it in popup mode in combination with a Button. I use it for a mobile burger menu. Problem is as follows:

If the menu is longer than the available display space to the bottom, it switches to the top, what is generally ok. My Problem is, that to the top there isn't enough space available, too, so that the menu just disappears and you cannot even scroll there.

You can reproduce this by just switching to the showcase page of the Menu component (https://www.primefaces.org/primereact/#/menu) open the popup menu via the button and then resize the window to make it switch to the top. If you then scroll down the page the menu will disappear. In my case the page is at the top position and the menu just disappears with nowhere to scroll to.

I already had a look into the component and think, that the problem lies within DomHandler.absolutePosition. Maybe it only checks if there isn't enough space below the button and switches the top value, but does not check for the available space above.

Post Reply

Return to “PrimeReact”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 7 guests