Skip to content

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

Description

@xinghul

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions