I have a text area, it's rather large with quite a bit of data. I want the ctrl+z undo buffer to be updated more frequently, probably every time the user hits enter. By default as far as I can tell the buffer is updated only when the textarea on blur or on ctrl+y/ctrl+z.
I don't want to blur the textarea every time they hit enter.
Can you blur and set focus back-to-back so that the undo state is set more frequently?
Basically, listen for key press, and on the enter key, make the switch. It may be glitchy in some cases, but I think it will work. To catch characters typed quickly after the enter key, set focus on a small text input on a box behind your main box, and then when re-focusing, add any text that was missing.