Added an option to conditionally override the scroll position (top position may not be desirable if switching between modal dialog and menu at different breakpoints).