diff options
author | Matthew Somerville <matthew@mysociety.org> | 2012-03-01 20:35:56 +0000 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2012-03-01 20:35:56 +0000 |
commit | 2e697be14d06a9ef1bfe0bdb97b7820fb04d45c2 (patch) | |
tree | cf39c7479c8302fbf865a9b185eb03e6d5b00546 /web/js/map-OpenLayers.js | |
parent | 37ddd5723ea69097f83c24ff279c3865ba8dc102 (diff) |
Allow back button to work when reading mobile reporting notes, fixes #260.
Diffstat (limited to 'web/js/map-OpenLayers.js')
-rw-r--r-- | web/js/map-OpenLayers.js | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/web/js/map-OpenLayers.js b/web/js/map-OpenLayers.js index abee9ebfa..aec9b69b1 100644 --- a/web/js/map-OpenLayers.js +++ b/web/js/map-OpenLayers.js @@ -259,7 +259,15 @@ $(function(){ } $(window).hashchange(function(){ - if (location.hash) { return; } + if (location.hash == '#report' && $('.rap-notes').is(':visible')) { + $('.rap-notes-close').click(); + return; + } + + if (location.hash) { + return; + } + // Okay, back to around view. fixmystreet.bbox_strategy.activate(); fixmystreet.markers.refresh( { force: true } ); |