ant-design/ant-design
在 GitHub 查看Mentions: unexpected behavior with max-height and scroll
Open
#41,654 建立於 2023年4月5日
Inactivehelp wanted🐛 Bug
描述
Reproduction link
https://stackblitz.com/edit/react-xhqjdv?file=demo.tsx,index.css
Steps to reproduce
- add a max-height on the textarea (already done in the reproduction link)
- add enough text to enable the scroll in the textarea
- trigger the suggestion panel by typing "@"
- scroll up

What is expected?
Have the suggestion panel to stay at same place where it has been triggered, but automatically hides when scrolling up (the same way Facebook is using it)

What is actually happening?
stay at same place where it has been triggered but stays visible
| Environment | Info |
|---|---|
| antd | 5.4.0 |
| React | 17.0.4 |
| System | macOS 13.3 |
| Browser | Chome 111.0.5563.146 |