]> git.openstreetmap.org Git - rails.git/commitdiff
Merge remote-tracking branch 'upstream/pull/4293'
authorTom Hughes <tom@compton.nu>
Wed, 25 Oct 2023 17:19:57 +0000 (18:19 +0100)
committerTom Hughes <tom@compton.nu>
Wed, 25 Oct 2023 17:19:57 +0000 (18:19 +0100)
app/assets/javascripts/index.js
app/assets/stylesheets/common.scss

index 783c4da8d2597fdac9ecff064087155eb7836e0f..e45d28321c859c52ff06a50a2893cec8e35f0920 100644 (file)
@@ -175,8 +175,7 @@ $(document).ready(function () {
     }
   }
 
-  var placement = $("html").attr("dir") === "rtl" ? "right" : "left";
-  $(".leaflet-control .control-button").tooltip({ placement: placement, container: "body" });
+  $(".leaflet-control .control-button").tooltip({ placement: "left", container: "body" });
 
   var expiry = new Date();
   expiry.setYear(expiry.getFullYear() + 10);
index dcbf00be85d4f86ccf00ed11c5bf20caca2a39ab..40392cdae5362963ce5f8fb96e1e84b7f09ade6e 100644 (file)
@@ -2,6 +2,34 @@
 @import "bootstrap";
 @import "rails_bootstrap_forms";
 
+/* Bootstrap + r2 fixes */
+
+:root[dir=rtl] {
+  .bs-tooltip-auto[data-popper-placement^="right"] .tooltip-arrow {
+    /* no-r2 */
+    right: unset !important;
+    left: calc(-1 * var(--bs-tooltip-arrow-height)) !important;
+
+    &::before {
+      /* no-r2 */
+      left: unset !important;
+      right: -1px !important;
+    }
+  }
+
+  .bs-tooltip-auto[data-popper-placement^="left"] .tooltip-arrow {
+    /* no-r2 */
+    left: unset !important;
+    right: calc(-1 * var(--bs-tooltip-arrow-height)) !important;
+
+    &::before {
+      /* no-r2 */
+      right: unset !important;
+      left: -1px !important;
+    }
+  }
+}
+
 /* Styles common to large and small screens */
 
 /* Default rules for the body of every page */