Support for fixed parent element

When the element’s parent has position:fixed, the overlay doesn’t work
correctly.