Fixing isShown: zero-size element should be invisible if it contains a
text node that contains only space symbols. Fixes issue 5220