Fixed bug where caret would jump from regex box to text box after typing in regex box