diff --git a/samples/common.js b/samples/common.js index 738c8de..b2b5ebf 100644 --- a/samples/common.js +++ b/samples/common.js @@ -59,10 +59,10 @@ class BesStatusIconEventSink { const rect = service.textElement.getBoundingClientRect() const scrollbarWidth = service.textElement.offsetWidth - service.textElement.clientWidth - this.statusDiv.style.left = `${rect.right - 40 - scrollbarWidth}px` + this.statusDiv.style.left = `${rect.right - 40 - scrollbarWidth + window.scrollX}px` const scrollbarHeight = service.textElement.offsetHeight - service.textElement.clientHeight - this.statusDiv.style.top = `${rect.bottom - 30 - scrollbarHeight}px` + this.statusDiv.style.top = `${rect.bottom - 30 - scrollbarHeight + window.scrollY}px` } /**