reach/reach-ui

[menu-button] Right aligned menu with wide item infinitely resizes

Open

#631 建立於 2020年6月30日

在 GitHub 查看
 (1 留言) (0 反應) (0 負責人)TypeScript (558 fork)auto 404
Help WantedType: Bug

倉庫指標

Star
 (5,975 star)
PR 合併指標
 (PR 指標待抓取)

描述

🐛 Bug report

Current Behavior

When a Menu-Button is right aligned to a viewport and one of it's items is wide enough that the MenuList needs to occupy the full width of the screen and the item will still wrap - the MenuList/Popover grows towards the left edge of the viewport but when it collides it starts from 0 width again and animates in an infinite loop.

reach-menu-bug

Note I am not using Reach UIs styles

When I do try and use Reach UIs styles, I experience this behaviour instead.

Expected behavior

I'd expect the MenuList/Popover to occupy the full available width of the screen and for the items inside it to wrap within themselves the same way they do when the button is left aligned.

Reproducible example

Sandbox

Sandbox with Reach UI styles

Additional context

Seems related perhaps to this: https://github.com/reach/reach-ui/pull/189 At times I was able to reproduce the above issue in my same non-reach-ui-styles Sandbox above when resizing the viewport.

Your environment

image

貢獻者指南