Prevent default link action when showing modals

Clicking a link that displays a modal will cause the page
to scroll to the bottom of the content if the content is longer
than the height of the viewport. This change prevents that from
happening.