refocus cursor after draw