Fixed a drag to focus bug when attempting to refocus or dismiss