Need to preventDefault on href='#' links

Fixes https://trac.openstreetmap.org/ticket/4947