fixed popup event listener