This commit is contained in:
かっこかり 2024-11-22 10:04:59 +09:00 committed by GitHub
commit ece631bf03
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 15 additions and 2 deletions

View File

@ -44,6 +44,8 @@
(Cherry-picked from https://github.com/MisskeyIO/misskey/pull/815)
- Fix: TypeScriptの型チェック対象ファイルを限定してビルドを高速化するように
(Cherry-picked from https://activitypub.software/TransFem-org/Sharkey/-/merge_requests/725)
- Fix: ごくまれに上方向へのスクロールができなくなる問題を抑制
(Cherry-picked from https://github.com/MisskeyIO/misskey/pull/244)
### Server
- Enhance: DockerのNode.jsを22.11.0に更新

View File

@ -23,7 +23,7 @@ SPDX-License-Identifier: AGPL-3.0-only
</template>
<script lang="ts" setup>
import { onMounted, onUnmounted, ref, shallowRef } from 'vue';
import { onMounted, onUnmounted, onActivated, onDeactivated, ref, shallowRef } from 'vue';
import { i18n } from '@/i18n.js';
import { getScrollContainer } from '@@/js/scroll.js';
import { isHorizontalSwipeSwiping } from '@/scripts/touch.js';
@ -198,8 +198,8 @@ function unregisterEventListenersForReadyToPull() {
}
onMounted(() => {
isRefreshing.value = false;
if (rootEl.value == null) return;
scrollEl = getScrollContainer(rootEl.value);
if (scrollEl == null) return;
@ -210,7 +210,18 @@ onMounted(() => {
registerEventListenersForReadyToPull();
});
onActivated(() => {
isRefreshing.value = false;
});
onDeactivated(() => {
scrollEl!.style.touchAction = 'auto';
isRefreshing.value = true;
});
onUnmounted(() => {
scrollEl!.style.touchAction = 'auto';
isRefreshing.value = true;
if (scrollEl) scrollEl.removeEventListener('scroll', onScrollContainerScroll);
unregisterEventListenersForReadyToPull();