dropdown icon indicating copy to clipboard operation
dropdown copied to clipboard

Dropdown is causing Input to lose focus when the menu opens @3.2.3

Open xinghul opened this issue 3 years ago • 0 comments

Hello, here's how im using the Dropdown from antd:

const [menuVisible, setMenuVisible] = useState(false);

const onInputFocus = useCallback(() => setMenuVisible(true), []);
const onInputBlur = useCallback(() => setMenuVisible(false), []);

<Dropdown overlay={OptionMenu} visible={menuVisible}>
  <Input
    className={styles.input}
    onFocus={onInputFocus}
    onBlur={onInputBlur}
  />
</Dropdown>

And I can confirm that every time the Dropdown opens, the onBlur on Input is triggered.

The issue is introduced in version @3.2.3, and I reverted back to use version @3.2.2 and the issue is fixed.

xinghul avatar Jan 28 '22 20:01 xinghul