Replacing popups clearing on scroll

Including some fixes for their integration with new events model.