]> git.openstreetmap.org Git - rails.git/commitdiff
Stop query button disabling query mode once it is active
authorTom Hughes <tom@compton.nu>
Fri, 28 Mar 2014 22:44:59 +0000 (22:44 +0000)
committerTom Hughes <tom@compton.nu>
Fri, 28 Mar 2014 22:44:59 +0000 (22:44 +0000)
app/assets/javascripts/index/query.js

index 58750d242c6f5b20f61699bc8d349a8a1dcfa648..2a84207ec55fe9b35f800cfdc0064fc9829b8be8 100644 (file)
@@ -22,9 +22,9 @@ OSM.Query = function(map) {
     if (queryButton.hasClass("disabled")) return;
 
     if (queryButton.hasClass("active")) {
-      disableQueryMode();
-
-      OSM.router.route("/");
+      if ($("#content").hasClass("overlay-sidebar")) {
+        disableQueryMode();
+      }
     } else {
       enableQueryMode();
     }