Here is the scenario:
- I have editable content div. I also have textarea on which there are some things happening on .keyup ().
- I need to on keyup () the contents of the editable div, copy the text entered in the contenteditable div into the text box, and then fire the keyup event in the text box through jquery.
What I have achieved so far:
I found that keyup () does not start until there is a physical click on the text box. Initially, if I do .trigger ("keyup") in textarea, nothing happens. but if I click on the text field, enter something in the contenteditable div and do .trigger ('keyup') in textarea, the keyup textarea event will fire and everything works like a charm.
Any directions would be highly appreciated. Thanks in advance.
source
share