From: John Firebaugh Date: Thu, 15 Aug 2013 16:21:12 +0000 (-0700) Subject: Need to preventDefault on href='#' links X-Git-Tag: live~4802 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/c919340c1193730c29710468f8d528967914bc61?hp=70190cf363583ea2941d21b7ea6e0a57608d9437 Need to preventDefault on href='#' links Fixes https://trac.openstreetmap.org/ticket/4947 --- diff --git a/app/assets/javascripts/index/browse.js b/app/assets/javascripts/index/browse.js index a9bdbf2b7..d8de69974 100644 --- a/app/assets/javascripts/index/browse.js +++ b/app/assets/javascripts/index/browse.js @@ -113,7 +113,9 @@ function initializeBrowse(map, params) { getData(); } - function toggleAreas() { + function toggleAreas(e) { + e.preventDefault(); + if (areasHidden) { $("#browse_hide_areas_box").html(I18n.t('browse.start_rjs.hide_areas')); areasHidden = false;