Change document listener to focuslistener