aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Somerville <matthew-github@dracos.co.uk>2016-07-11 15:14:36 +0100
committerMatthew Somerville <matthew-github@dracos.co.uk>2016-07-11 15:15:34 +0100
commit8badf396faf199eec72b7b0c1790e055d23c3971 (patch)
tree10024ec1d68be4e2c60ada5e9780f998442bc20b
parentee7234891fd1d3d57f9b3e51df3d6dda49e465d2 (diff)
Fix top of content display if scrolled previously.
-rw-r--r--web/cobrands/fixmystreet/fixmystreet.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/web/cobrands/fixmystreet/fixmystreet.js b/web/cobrands/fixmystreet/fixmystreet.js
index b971b423d..0a6c57676 100644
--- a/web/cobrands/fixmystreet/fixmystreet.js
+++ b/web/cobrands/fixmystreet/fixmystreet.js
@@ -562,7 +562,7 @@ fixmystreet.update_pin = function(lonlat) {
if (!$('#side-form-error').is(':visible')) {
$('#side-form, #site-logo').show();
- window.scrollTo(0, 0);
+ $('#map_sidebar').scrollTop(0);
}
};
@@ -668,6 +668,7 @@ fixmystreet.display = {
$('#side').hide(); // Hide the list of reports
$('#side-report').remove(); // Remove any existing report page content from sidebar
$sideReport.appendTo('#map_sidebar'); // Insert this report's content
+ $('#map_sidebar').scrollTop(0);
var found = html.match(/<title>([\s\S]*?)<\/title>/);
var page_title = found[1];