chore: fix overlay positioning (#8848)
* chore: fix overlay positioning
This reverts commit 155970a02ce76b57c5dcba660d18272be9624d80.
* incorporate viewport, bounding box, and container descendent of boundary
* fix flip for when overlay should based on height not on scrolling
---------
Co-authored-by: Reid Barber <reid@reidbarber.com>