fix: chatbox height
This commit is contained in:
parent
fd46a27078
commit
84209c3ff3
@ -18,8 +18,10 @@ document.addEventListener("DOMContentLoaded", () => {
|
||||
let viewportChat = Array.from(
|
||||
document.querySelectorAll("#viewport .chat-view")
|
||||
);
|
||||
let headerOffset = document.querySelector('#header').offsetHeight;
|
||||
let intermediateOffset = Array.from(document.querySelectorAll(".content-box__header")).filter(el=>el.offsetParent!==null?el:null)[0].offsetHeight;
|
||||
viewportChat.forEach(
|
||||
(c) => (c.style.height = "calc(100vh - 106px - 57px - 4px)")
|
||||
(c) => (c.style.height = "calc(100vh - "+String(headerOffset+intermediateOffset)+"px)") // Firefox keyboard 57px
|
||||
);
|
||||
}
|
||||
}
|
||||
@ -33,7 +35,7 @@ document.addEventListener("DOMContentLoaded", () => {
|
||||
clearInterval(isbody);
|
||||
resizeChat();
|
||||
}
|
||||
}, 15);
|
||||
}, 50);
|
||||
|
||||
window.addEventListener("load", () => {
|
||||
setTimeout(() => {
|
||||
@ -41,10 +43,12 @@ document.addEventListener("DOMContentLoaded", () => {
|
||||
}, 0);
|
||||
});
|
||||
|
||||
let windowResizing;
|
||||
window.addEventListener("resize", () => {
|
||||
setTimeout(() => {
|
||||
windowResizing = setTimeout(() => {
|
||||
clearInterval(windowResizing);
|
||||
resizeChat();
|
||||
}, 0);
|
||||
}, 50);
|
||||
});
|
||||
|
||||
document.addEventListener("navigate", () => {
|
||||
|
@ -9,5 +9,8 @@
|
||||
}
|
||||
.avatar-text {
|
||||
position: absolute;
|
||||
top: 2.8rem;
|
||||
top: 7.5rem;
|
||||
@include breakpoint(lg) {
|
||||
top: 2.8rem;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user