Fixed bug with double keyboard event in popup