popup: closes when user clicks button or some inputs via spacebar (close #1134)

close #1134
// cc @narqo @dfilatov 
Maybe we could optimise `_preventHideByClick` method in some way? Now this loop runs twice on each click`: first while handling `pointerpress`, second on `pointerclick`.