@homecode/ui 5.20.15 → 5.20.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -19,6 +19,10 @@ const useSimplePositionSetup = ({ triggerRef, tooltipRef, content, delay, direct
|
|
|
19
19
|
if (!trigger || !tooltip)
|
|
20
20
|
return;
|
|
21
21
|
const positionTooltip = () => {
|
|
22
|
+
// Measure from the corner: an old left near the viewport edge squeezes the
|
|
23
|
+
// width, wraps the text and makes the tooltip sit too high.
|
|
24
|
+
tooltip.style.left = '0px';
|
|
25
|
+
tooltip.style.top = '0px';
|
|
22
26
|
const rect = trigger.getBoundingClientRect();
|
|
23
27
|
const tooltipRect = tooltip.getBoundingClientRect();
|
|
24
28
|
let top = 0;
|