We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8f7cf64 commit dfdb4a2Copy full SHA for dfdb4a2
src/GleapTooltipManager.js
@@ -306,7 +306,10 @@ export default class GleapTooltipManager {
306
var range = document.createRange();
307
range.selectNodeContents(element);
308
const style = window.getComputedStyle(element);
309
- elementRect.width = range.getBoundingClientRect().width + parseFloat(style.paddingLeft);
+ const fixedWidth = range.getBoundingClientRect().width + parseFloat(style.paddingLeft);
310
+ if (fixedWidth < elementRect.width) {
311
+ elementRect.width = fixedWidth;
312
+ }
313
} catch (exp) { }
314
315
const anchorElement = document.querySelector(`[data-gleap-tooltip-anchor="${tooltipId}"]`);
0 commit comments