mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-29 20:19:22 +03:00
Bugfix: compose window resizeObserver
This commit is contained in:
parent
645831368d
commit
dcdaf70601
2 changed files with 5 additions and 8 deletions
|
|
@ -5,7 +5,7 @@
|
|||
width: 98%;
|
||||
max-width: 1000px;
|
||||
margin: 10px auto;
|
||||
/* height: 94vh;*/
|
||||
height: calc(100% - 60px);
|
||||
|
||||
.modal-body {
|
||||
overflow: auto;
|
||||
|
|
|
|||
|
|
@ -1053,7 +1053,6 @@ class ComposePopupView extends AbstractViewNext {
|
|||
|
||||
let el = document.querySelector('.b-compose');
|
||||
this.resizeObserver.compose = el;
|
||||
this.resizeObserver.popups = el.parentNode; // el.closest('.popups');
|
||||
this.resizeObserver.els = [el.querySelector('.textAreaParent'), el.querySelector('.attachmentAreaParent')];
|
||||
this.resizeObserver.observe(el);
|
||||
this.resizeObserver.observe(el.querySelector('.b-header'));
|
||||
|
|
@ -1509,13 +1508,11 @@ class ComposePopupView extends AbstractViewNext {
|
|||
}
|
||||
|
||||
resizerTrigger() {
|
||||
let top = 0;
|
||||
this.resizeObserver.els.forEach(element => top = Math.max(top, element.getBoundingClientRect().top));
|
||||
let top = 0, ro = this.resizeObserver;
|
||||
ro.els.forEach(element => top = Math.max(top, element.getBoundingClientRect().top));
|
||||
if (0 < top) {
|
||||
top = this.resizeObserver.popups.clientHeight - this.resizeObserver.compose.offsetTop - 50 - top;
|
||||
this.resizeObserver.els.forEach(element =>
|
||||
element.style.height = Math.max(top, Math.max(200,parseInt(element.style.minHeight,10))) + 'px'
|
||||
);
|
||||
top = ro.compose.clientHeight - top;
|
||||
ro.els.forEach(element => element.style.height = Math.max(top, 200) + 'px');
|
||||
if (this.oEditor) {
|
||||
this.oEditor.resize();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue