Reproduction link
Steps to reproduce
- Type some text with a couple of line breaks in the
textarea
. - Try to navigate the
textarea
with the up and down arrows. - Type two slashes to trigger the autocomplete dropdown.
- Use the up and down arrow keys then select an option from the dropdown.
- Once dropdown is closed, try to navigate the
textarea
with the arrow up and down keys.
What is expected?
Navigating the textarea
with the up and down arrows when the autocomplete dropdown is closed.
What is actually happening?
The textarea
cannot be navigated with the up and down arrows even when the autocomplete dropdown is closed.
| Environment | Info |
| ------------ | ------------ |
| antd | 4.19.5 |
| React | 17.0.2 |
| System | Windows 10 Version 21H2 (OS Build 19044, 1706) |
| Browser | Version 103.0.5060.66 (Official Build) (64-bit) |
4条答案
按热度按时间mzaanser1#
The problem caused by
setOptions([])
in theonSelect
methodYou clear the expansion after each selection, so you can't select it again next time
The flickering you said when selecting is actually
select
closing the animationdemo: https://codesandbox.io/s/templating-in-antd-forked-1qjdet?file=/demo.js:1052-1084
wkftcu5l2#
@usersina@xccjk Were you able to resolve this issue? I opened a similar issue to this one #49260 without response.
I've tried using the
Mentions
component to no avail as that does not allow external control over the open/closed state of the popover.Do you have any other suggestions or ideas on how one might tackle this problem?
f8rj6qna3#
@afc163@xccjk still have this issue +1
vuktfyat4#
This works in my case.
Looks like the AutoComplete is stealing some keys so it can work properly. But it is not compatible with TextArea.