Find a way to correctly position statusDiv element inside CKEditor.
This commit is contained in:
parent
94f55e0d7f
commit
5871f38f26
10
service2.js
10
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`
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user