I have created a small plugin that pops up a dialog in which users can enter source code.
As it's source code, users should be able to press the TAB key in the dialog to indent their code. Unfortunately pressing TAB results in the textarea loosing the focus and moving to the next element in the dialog.
How can I prevent this? I already tried adding keypress event handlers to the dialog, but somehow that doesn't work. Any hints are most welcome!
As it's source code, users should be able to press the TAB key in the dialog to indent their code. Unfortunately pressing TAB results in the textarea loosing the focus and moving to the next element in the dialog.
How can I prevent this? I already tried adding keypress event handlers to the dialog, but somehow that doesn't work. Any hints are most welcome!