From 84ed38d7d7a0b853b47a14d7e0611943f00063f6 Mon Sep 17 00:00:00 2001 From: murin Date: Thu, 21 Nov 2024 11:56:41 +0300 Subject: Explicitly set collision option for tooltips When tooltip initializes for the first time on page loading, it has a `collision: "flipfit flip"` option. When the tooltip is reinitialized (e.g., when the "Options" field set is opened on the query page), it no longer has a `collision: "flipfit flip"` option. In this case, if a large object (e.g., column title in a query) is partially visible on screen, its tooltip will be partially or completely outside the screen. Explicitly setting the `collision: "flipfit flip"` option for every tooltip initialization fixes this problem. --- app/assets/javascripts/application.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/assets/javascripts/application.js b/app/assets/javascripts/application.js index f17d782e2..4da3cbe6b 100644 --- a/app/assets/javascripts/application.js +++ b/app/assets/javascripts/application.js @@ -1156,7 +1156,8 @@ function initTooltips() { }, position: { my: "center bottom-5", - at: "center top" + at: "center top", + collision: "flipfit flip" } }); } -- 2.25.1