update editor selection only if it has focus - fix related to problem with adding link