Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
xinghul opened this issue Jan 28, 2022 · 0 comments
Open

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

xinghul opened this issue Jan 28, 2022 · 0 comments

Comments

@xinghul
Copy link

xinghul commented Jan 28, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant