Skip to content

Commit

Permalink
Merge pull request #34 from OVINC-CN/feat_touch
Browse files Browse the repository at this point in the history
feat: mobile touch event
  • Loading branch information
OrenZhang authored Jul 11, 2024
2 parents 035bf0f + 3a7ec7c commit 27619b5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/components/MessageDisplay.vue
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,16 @@ onMounted(() => {
el.addEventListener('wheel', () => {
emits('toggleUserBehavior', true);
});
el.addEventListener('touchmove', () => {
emits('toggleUserBehavior', true);
});
}
});
onUnmounted(() => {
const el = document.getElementById('chat-display');
if (el) {
el.removeEventListener('wheel', () => {});
el.removeEventListener('touchmove', () => {});
}
});
</script>
Expand Down

0 comments on commit 27619b5

Please sign in to comment.