Only close a suggester if it's open

The old behaviour caused problems with Wikibase client's
linkItem: The selected page disappeared once the user clicked
on anything (including the submit button).