fix popup scroll behaviour to prevent closing of popup when popup is scrolled to end