Description
Reproduction link
Steps to reproduce
- Add a antd
<Dropdown>
as acontrolled React component to your app. Configure the dropdown to trigger on right-click, aka "contextMenu" (trigger={["contextMenu"]}
). - Trigger the dropdown to open as a controlled component through the
open
prop (e.g.open={isOpen}
) - Dropdown menu is rendered at the top left corner of the screen (0,0), partially outside of the screen
What is expected?
The dropdown menu is supposed to open at the location of the component's DOM position or parent
What is actually happening?
The Dropdown menu is rendered at the top left corner of the screen (0,0), partially outside of the screen

Environment | Info |
---|---|
antd | 5.13.2 |
React | 16 & 18 |
System | MacOS 14.0 |
Browser | Chrome 120.0.6099.199 |
- I can reliably trigger the bug by configuring the dropdown to trigger on right-click, aka "contextMenu" (
trigger={["contextMenu"]}
). The bug does not happen withtrigger={"click"}
. - The bug only occurs if you have never triggered the Dropdown with a right-click. It must be triggered as a controlled component through the
open
prop.