From 5871f38f26efda5a2e7b1200b3efe4d742aef68c Mon Sep 17 00:00:00 2001 From: Aljaz Grilc Date: Thu, 23 May 2024 14:20:59 +0200 Subject: [PATCH] Find a way to correctly position statusDiv element inside CKEditor. --- service2.js | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/service2.js b/service2.js index 00a831d..d1bc28a 100644 --- a/service2.js +++ b/service2.js @@ -911,14 +911,8 @@ class BesCKService extends BesTreeService { * Repositions status DIV element. */ setStatusDivPosition() { - // TODO: The position returned by this.hostElement.getBoundingClientRect() appears to be absolute, - // while this.statusDiv.style.left and .top require relative position. Either compensate by subtracting - // CKEditor frame position, or change statusDiv placement to absolute. - const rect = this.hostElement.getBoundingClientRect() - const scrollLeft = window.scrollX || document.documentElement.scrollLeft - const scrollTop = window.scrollY || document.documentElement.scrollTop - this.statusDiv.style.left = `${rect.right - 50 + scrollLeft}px` - this.statusDiv.style.top = `${rect.bottom - 120 + scrollTop}px` + this.statusDiv.style.right = `10px` + this.statusDiv.style.bottom = `10px` } }