From efc0009301463cd4ef710d78bdf4f954cbc5b072 Mon Sep 17 00:00:00 2001 From: Simon Rozman Date: Mon, 10 Jun 2024 14:49:06 +0200 Subject: [PATCH] Put back horizontal scrolling option DOM document is 2-dimensional! What applies to one dimension, may apply to another too. Never assume we're scrolling texts vertically only. --- service2.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/service2.js b/service2.js index 0cf2d42..e30390b 100644 --- a/service2.js +++ b/service2.js @@ -266,14 +266,20 @@ class BesService { */ setCorrectionPanelSize() { const styles = window.getComputedStyle(this.hostElement) + const totalWidth = + parseFloat(styles.paddingLeft) + + parseFloat(styles.marginLeft) + + parseFloat(styles.width) + + parseFloat(styles.marginRight) + + parseFloat(styles.paddingRight) const totalHeight = parseFloat(styles.paddingTop) + parseFloat(styles.marginTop) + parseFloat(styles.height) + parseFloat(styles.marginBottom) + parseFloat(styles.paddingBottom) + this.correctionPanel.style.width = `${totalWidth}px` this.correctionPanel.style.height = `${totalHeight}px` - this.correctionPanel.style.width = styles.width this.correctionPanel.style.marginLeft = styles.marginLeft this.correctionPanel.style.marginRight = styles.marginRight this.correctionPanel.style.paddingLeft = styles.paddingLeft