Suppose I have a simple HTML page with textarea and I want to wrap this textarea in a DIV. However, this does not always happen when loading / loading a page, so the user may have focus in this area or even print.
I can move / wrap the area by creating a DIV, adding it to the textarea parent and then putting the textarea inside, and it works fine. However, when I do this, the focus is removed from textarea , and if the user is in the middle of typing, they will get angry.
How can I move the textarea DOM node without interrupting the user? Is it possible?
source share