palantir/blueprint

Submenu with many menu items are not correct calculated top position

Open

#3.871 aberto em 29 de nov. de 2019

Ver no GitHub
 (8 comments) (2 reactions) (0 assignees)TypeScript (2.167 forks)batch import
P3Package: coreType: enhancementhelp wanted

Métricas do repositório

Stars
 (20.263 stars)
Métricas de merge de PR
 (Mesclagem média 24d 18h) (17 fundiu PRs em 30d)

Description

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.

Guia do colaborador