diff options
author | Matthew Somerville <matthew-github@dracos.co.uk> | 2018-06-06 18:10:16 +0100 |
---|---|---|
committer | Matthew Somerville <matthew-github@dracos.co.uk> | 2018-06-06 18:10:26 +0100 |
commit | d63444cb405fa386ad153cab0347df19898bffae (patch) | |
tree | 2ce4cc3bb6c2b970971c84cfb47df5073690dc5b | |
parent | 8fca26f8e0bbbb8fee724217f67ad44938d0421f (diff) |
Fix display going back from report as inspector.
The scroll position wa being remmbered, meaning
the full-page map was not being shown correctly.
-rw-r--r-- | CHANGELOG.md | 1 | ||||
-rw-r--r-- | web/cobrands/fixmystreet/fixmystreet.js | 6 |
2 files changed, 6 insertions, 1 deletions
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() { |