aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG.md1
-rw-r--r--web/cobrands/fixmystreet/fixmystreet.js3
-rw-r--r--web/js/map-OpenLayers.js25
3 files changed, 18 insertions, 11 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 07b857a1e..cd2f4a038 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -8,6 +8,7 @@
- Clearer relocation options while you’re reporting a problem #2238
- Simplify /auth sign in page. #2208
- Enforce maximum photo size server side, strip EXIF data. #2326 #2134
+ - Don't require two taps on reports list on touchscreens. #2294
- Admin improvements:
- Allow moderation to potentially change category. #2320
- Add Mark/View private reports permission #2306
diff --git a/web/cobrands/fixmystreet/fixmystreet.js b/web/cobrands/fixmystreet/fixmystreet.js
index ac064de99..5a326e6f9 100644
--- a/web/cobrands/fixmystreet/fixmystreet.js
+++ b/web/cobrands/fixmystreet/fixmystreet.js
@@ -1229,6 +1229,9 @@ fixmystreet.display = {
$sideReport.appendTo('#map_sidebar');
}
$('#map_sidebar').scrollTop(0);
+ if ($("html").hasClass("mobile")) {
+ $(document).scrollTop(0);
+ }
var found = html.match(/<title>([\s\S]*?)<\/title>/);
var page_title = found[1];
diff --git a/web/js/map-OpenLayers.js b/web/js/map-OpenLayers.js
index eff52932f..66168925a 100644
--- a/web/js/map-OpenLayers.js
+++ b/web/js/map-OpenLayers.js
@@ -839,17 +839,20 @@ $.extend(fixmystreet.utils, {
$(fixmystreet).trigger('maps:update_view');
});
- (function() {
- var timeout;
- $('#js-reports-list').on('mouseenter', '.item-list--reports__item', function(){
- var href = $('a', this).attr('href');
- var id = parseInt(href.replace(/^.*[\/]([0-9]+)$/, '$1'),10);
- clearTimeout(timeout);
- fixmystreet.maps.markers_highlight(id);
- }).on('mouseleave', '.item-list--reports__item', function(){
- timeout = setTimeout(fixmystreet.maps.markers_highlight, 50);
- });
- })();
+ if (!fixmystreet.map.events.extensions.buttonclick.isDeviceTouchCapable) {
+ // On touchscreens go straight to the report (see #2294).
+ (function() {
+ var timeout;
+ $('#js-reports-list').on('mouseenter', '.item-list--reports__item', function(){
+ var href = $('a', this).attr('href');
+ var id = parseInt(href.replace(/^.*[\/]([0-9]+)$/, '$1'),10);
+ clearTimeout(timeout);
+ fixmystreet.maps.markers_highlight(id);
+ }).on('mouseleave', '.item-list--reports__item', function(){
+ timeout = setTimeout(fixmystreet.maps.markers_highlight, 50);
+ });
+ })();
+ }
});
// End maps closure