* Added method to check if editor has focus.