palantir/blueprint

Submenu with many menu items are not correct calculated top position

Open

#3,871 opened on 2019年11月29日

GitHub で見る
 (8 comments) (2 reactions) (0 assignees)TypeScript (20,263 stars) (2,167 forks)batch import
P3Package: coreType: enhancementhelp wanted

説明

Environment

  • Package version(s): @blueprintjs/core@3.22.0
  • Browser and OS versions: Chrome 78.0.3904.108 Windows 10

https://codesandbox.io/s/gifted-snow-00f0h

Steps to reproduce

  1. I just took an example from the official documentation
  2. Added a lot of child items to a menu item called style
  3. When I open a submenu in a menu item called a style, I see part of the submenu, the other part of the submenu is outside the window.

Actual behavior

Big submenu is outside the window.

Expected behavior

The submenu is positioned at the top of the container and have scrolling.

Possible solution

You can position the submenu on the top edge using the position: “auto-end” property, but in this case the submenu will also be outside the window, but at the bottom of it. I think it would be right to calculate the actual size of the container and not allow the submenu to be large, but to have scrolling instead.

コントリビューターガイド