Don't focus if no tab content

this is a bit of a hack - not sure what the underlying issue is.