ant-design/ant-design

Mentions: unexpected behavior with max-height and scroll

Open

#41,654 建立於 2023年4月5日

在 GitHub 查看
 (3 留言) (0 反應) (0 負責人)TypeScript (98,031 star) (54,612 fork)batch import
Inactivehelp wanted🐛 Bug

描述

Reproduction link

https://stackblitz.com/edit/react-xhqjdv?file=demo.tsx,index.css

Steps to reproduce

  1. add a max-height on the textarea (already done in the reproduction link)
  2. add enough text to enable the scroll in the textarea
  3. trigger the suggestion panel by typing "@"
  4. scroll up

antd-bug

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)

facebook-scroll

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

貢獻者指南