compatibility fix for modals on mobile devices