I do an online code editor, respectively, wherever without the good old TAB, but when I click, of course, the focus goes away from the input field.

Tell me if there are any solutions to this problem.

PS If this is important, then I have a field-textarea

  • I can show how on Jqyery, if it suits of course)) - Arsen

1 answer 1

Taken from here

<textarea onkeydown="if(event.keyCode===9){var v=this.value,s=this.selectionStart,e=this.selectionEnd;this.value=v.substring(0, s)+'\t'+v.substring(e);this.selectionStart=this.selectionEnd=s+1;return false;}"> </textarea> 

  • thanks a lot) - Michael