Got the details popup to stay inside the window