fix: broken chats #16

Manually merged
Johann150 merged 3 commits from :fix-chat-continuation into main 2022-07-19 07:21:17 +00:00
2 changed files with 18 additions and 15 deletions
Showing only changes of commit 36503f63d8 - Show all commits

View file

@ -192,8 +192,9 @@ const prepend = (item: Item): void => {
if (props.pagination.reversed) {
if (rootEl.value) {
const container = getScrollContainer(rootEl.value);
if (container == null) return; // TODO?
if (container == null) {
// TODO?
} else {
const pos = getScrollPosition(rootEl.value);
const viewHeight = container.clientHeight;
const height = container.scrollHeight;
@ -210,6 +211,7 @@ const prepend = (item: Item): void => {
}
}
}
}
items.value.push(item);
// TODO
} else {

View file

@ -292,6 +292,7 @@ definePageMetadata(computed(() => !fetching ? user ? {
<style lang="scss" scoped>
.mk-messaging-room {
position: relative;
overflow: auto;
Johann150 marked this conversation as resolved
Review

I think using overflow-y here is a better idea. Otherwise browsers will always show an unnecessary scroll bar for horizontal scrolling.

Or maybe use overflow: auto; instead to let the browser decide when scroll bars are necessary.
-- https://github.com/misskey-dev/misskey/pull/8951#discussion_r915101719

> I think using `overflow-y` here is a better idea. Otherwise browsers will always show an unnecessary scroll bar for horizontal scrolling. > > Or maybe use `overflow: auto;` instead to let the browser decide when scroll bars are necessary. -- https://github.com/misskey-dev/misskey/pull/8951#discussion_r915101719
Review

Hang on that already says overflow auto...

Hang on that already says overflow auto...
> .body {
.more {
@ -337,7 +338,7 @@ definePageMetadata(computed(() => !fetching ? user ? {
padding-top: 8px;
@media (max-width: 500px) {
bottom: calc(env(safe-area-inset-bottom, 0px) + 92px);
bottom: calc(env(safe-area-inset-bottom, 0px) + 8px);
}
> .new-message {