From d63444cb405fa386ad153cab0347df19898bffae Mon Sep 17 00:00:00 2001 From: Matthew Somerville Date: Wed, 6 Jun 2018 18:10:16 +0100 Subject: Fix display going back from report as inspector. The scroll position wa being remmbered, meaning the full-page map was not being shown correctly. --- CHANGELOG.md | 1 + web/cobrands/fixmystreet/fixmystreet.js | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bb2487801..93dca7ccf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ - Prevent contact form leaking information about updates #2149 - Fix pointer event issue selecting pin on map. #2130 - Fix admin navigation links in multi-language installs. + - Fix map display issue clicking back from report page as inspector. * v2.3.2 (31st May 2018) - Front end improvements: diff --git a/web/cobrands/fixmystreet/fixmystreet.js b/web/cobrands/fixmystreet/fixmystreet.js index 1b0063f48..24597c225 100644 --- a/web/cobrands/fixmystreet/fixmystreet.js +++ b/web/cobrands/fixmystreet/fixmystreet.js @@ -157,7 +157,11 @@ fixmystreet.mobile_reporting = { // and special "OK/Cancel" buttons etc. $('html').addClass('map-fullscreen only-map map-reporting'); $('.mobile-map-banner span').text(translation_strings.place_pin_on_map); - $('html, body').scrollTop(0); + // Do this on a timeout, so it takes precedence over the browser’s + // remembered position, which we do not want, we want a fixed map. + setTimeout(function() { + $('html, body').scrollTop(0); + }, 0); }, remove_ui: function() { -- cgit v1.2.3