Fixed bug related to selection
Fixed bug with double keyboard event in popup