diff --git a/service.js b/service.js index b6ada28..e123081 100644 --- a/service.js +++ b/service.js @@ -332,7 +332,10 @@ class BesService { this.correctionPanel.style.paddingRight = styles.paddingRight this.scrollPanel.style.width = `${this.textElement.scrollWidth}px` if (this.isHostElementInline()) { - const hStyles = window.getComputedStyle(this.hostElement) + const hStyles = + this.hostElement !== this.textElement + ? window.getComputedStyle(this.hostElement) + : styles const totalWidth = parseFloat(styles.paddingLeft) + parseFloat(styles.marginLeft) +