nextui icon indicating copy to clipboard operation
nextui copied to clipboard

[BUG] - Position dropdown in NavBar

Open FPT-NMTung opened this issue 3 years ago • 4 comments

Describe the bug

The drop-down menu in the Navbar is now being moved according to the site content instead of not moving.

Your Example Website or App

https://nextui.org/docs/components/navbar#with-dropdown-menu

Steps to Reproduce the Bug or Issue

Using preview in page

image

  1. Go to website
  2. Scroll down
  3. Click Dropdown
  4. Scroll up

Expected behavior

As a user, I expected Dropdown is kept position according to Navbar behavior but i am seeing Dropdown is kept position by content

Screenshots or Videos

https://user-images.githubusercontent.com/63092029/188208459-487da371-5cf7-4867-8959-80c01eb6358a.mp4

Operating System Version

Windows 11

Browser

Edge

FPT-NMTung avatar Sep 02 '22 18:09 FPT-NMTung

I dont think this is a valid bug. Since the dropdown list container is appended in the tail of body and its position is absolute, it is normal for the dropdown to scroll with body.

sun0day avatar Sep 03 '22 16:09 sun0day

Perhaps using position: sticky; can be a solution.

Clovel avatar Sep 05 '22 09:09 Clovel

Hey guys, I already sent a PR to fix this, in the meantime, you can check this codesandbox to fix it while the new version (v11) is released, thanks! 🙌🏼

jrgarciadev avatar Sep 06 '22 02:09 jrgarciadev

Hi @jrgarciadev, I check in your preview and it work but i still see the same problem when use with Avatar component.

image

FPT-NMTung avatar Sep 06 '22 03:09 FPT-NMTung