Merge branch 'master' into feature/router-0.10
This commit is contained in:
commit
eb7ab82e2d
55
src/scripts/firefox-scroll.js
Normal file
55
src/scripts/firefox-scroll.js
Normal file
@ -0,0 +1,55 @@
|
||||
document.addEventListener("DOMContentLoaded", () => {
|
||||
const resizeChat = () => {
|
||||
let chatBox = Array.from(document.querySelectorAll("solid-xmpp-chat"))
|
||||
.map((el) => el.shadowRoot ? el.shadowRoot.getElementById("conversejs") : false)
|
||||
.filter((el) => el)
|
||||
.pop();
|
||||
if (chatBox) {
|
||||
let chatTextArea = chatBox.querySelector(".message-form-container");
|
||||
let ischatTextArea = setInterval(() => {
|
||||
chatTextArea = chatBox.querySelector(".message-form-container");
|
||||
if (chatTextArea) {
|
||||
clearInterval(ischatTextArea);
|
||||
if (
|
||||
chatBox.getBoundingClientRect().height -
|
||||
chatTextArea.getBoundingClientRect().height !=
|
||||
chatTextArea.offsetTop
|
||||
) {
|
||||
let viewportChat = Array.from(
|
||||
document.querySelectorAll("#viewport .chat-view")
|
||||
);
|
||||
viewportChat.forEach(
|
||||
(c) => (c.style.height = "calc(100vh - 106px - 57px - 4px)")
|
||||
);
|
||||
}
|
||||
}
|
||||
}, 15);
|
||||
}
|
||||
};
|
||||
resizeChat();
|
||||
|
||||
let isbody = setInterval(() => {
|
||||
if (document.body) {
|
||||
clearInterval(isbody);
|
||||
resizeChat();
|
||||
}
|
||||
}, 15);
|
||||
|
||||
window.addEventListener("load", () => {
|
||||
setTimeout(() => {
|
||||
resizeChat();
|
||||
}, 0);
|
||||
});
|
||||
|
||||
window.addEventListener("resize", () => {
|
||||
setTimeout(() => {
|
||||
resizeChat();
|
||||
}, 0);
|
||||
});
|
||||
|
||||
document.addEventListener("navigate", () => {
|
||||
setTimeout(() => {
|
||||
resizeChat();
|
||||
}, 0);
|
||||
});
|
||||
});
|
@ -49,6 +49,9 @@
|
||||
text-align: center;
|
||||
vertical-align: middle;
|
||||
}
|
||||
solid-multiple[name="user.communities"] {
|
||||
text-align: left;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user