Skip to content
This repository was archived by the owner on Sep 26, 2023. It is now read-only.

Commit 3b37070

Browse files
committed
Fix scrolling issue on touch devices
1 parent 7f7257d commit 3b37070

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

packages/picmo/src/views/EmojiArea.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,11 @@ export class EmojiArea extends View {
126126
}
127127

128128
private handleCategorySelect(category: CategoryKey, options?: SelectCategoryOptions) {
129+
130+
// On touch devices, if there is a "momentum scroll" in progress, we need to stop it so we can jump to the selected category
131+
this.el.style.overflow = 'hidden';
129132
this.selectCategory(category, options);
133+
this.el.style.overflow = 'auto';
130134
}
131135

132136
private createCategory(category: Category): EmojiCategory {

0 commit comments

Comments
 (0)