added conditional wrapper around repositioning logic for fullscreen modals - Fixes #32