fix opening popup on unrelated keypress