From 2e697be14d06a9ef1bfe0bdb97b7820fb04d45c2 Mon Sep 17 00:00:00 2001 From: Matthew Somerville Date: Thu, 1 Mar 2012 20:35:56 +0000 Subject: Allow back button to work when reading mobile reporting notes, fixes #260. --- web/js/map-OpenLayers.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'web/js/map-OpenLayers.js') 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 } ); -- cgit v1.2.3