Simultaneously update text area while typing in text field

前端 未结 4 502
无人及你
无人及你 2021-01-14 03:04

I want to update my text area along with typing in the text field but i get a delay of 1 keystroke while typing i.e when i press a key the previous key is displayed.Here is

4条回答
  •  长情又很酷
    2021-01-14 03:53

    You need to wait till the event on your TextField is processed before updating the TextArea. Your code update the TextArea before the TextField is done processing the new typed character. Hence the text set in the TextArea is one keystroke behind.

提交回复
热议问题