We do not actually know if we are focused. All we know is that the camera is no longer attempting to focus. So just hide the focus ring at this point.  As a general thing, if you're using setTimeout() you should suspect that you are doing something wrong.  I don't think you need either of the nested functions above.