don't update cursor if elem is not focused

If the focus is not on the textarea moving the cursor moves the focus
to the textarea which is very annoying if the user is already typing in
another form input.