only allow defocus if !string.empty() on TextEdit surface.