element.select() won't work if the browser doesn't have focus