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

close #1134
// cc @narqo @dfilatov 
I'm not talking about removing `pointerpress`, but about adding `pointerclick` listener for cases where `click` event generated programmatically. It seems it should solve our problem in more general way. 

Of course current `_onPointerPress` should have some changes too.