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.
|
* Repositions status DIV element.
|
||||||
*/
|
*/
|
||||||
setStatusDivPosition() {
|
setStatusDivPosition() {
|
||||||
// TODO: The position returned by this.hostElement.getBoundingClientRect() appears to be absolute,
|
this.statusDiv.style.right = `10px`
|
||||||
// while this.statusDiv.style.left and .top require relative position. Either compensate by subtracting
|
this.statusDiv.style.bottom = `10px`
|
||||||
// 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`
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user