]> git.openstreetmap.org Git - rails.git/commitdiff
Merge remote-tracking branch 'upstream/pull/3577'
authorTom Hughes <tom@compton.nu>
Sun, 19 Jun 2022 11:38:08 +0000 (12:38 +0100)
committerTom Hughes <tom@compton.nu>
Sun, 19 Jun 2022 11:38:08 +0000 (12:38 +0100)
app/assets/javascripts/application.js

index 03def573d448f29a5aaede16bba22f110e4b54d5..5028cdd1e2b272b0798d318a04f3a2f0705a11ef 100644 (file)
@@ -59,12 +59,14 @@ window.updateLinks = function (loc, zoom, layers, object) {
   var editDisabled = zoom < 13;
   $("#edit_tab")
     .tooltip({ placement: "bottom" })
-    .off("click.minzoom")
-    .on("click.minzoom", function () { return !editDisabled; })
-    .toggleClass("disabled", editDisabled)
     .attr("data-original-title", editDisabled ?
-      I18n.t("javascripts.site.edit_disabled_tooltip") : "");
-};
+      I18n.t("javascripts.site.edit_disabled_tooltip") : "")
+    // Disable the button group and also the buttons to avoid 
+    // inconsistent behaviour when zooming
+    .toggleClass("disabled", editDisabled)
+    .find("a")
+    .toggleClass("disabled", editDisabled)
+ };
 
 window.maximiseMap = function () {
   $("#content").addClass("maximised");