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

Commit

Permalink
Fix scrolling issue on touch devices
Browse files Browse the repository at this point in the history
  • Loading branch information
joeattardi committed Feb 7, 2023
1 parent 7f7257d commit 3b37070
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/picmo/src/views/EmojiArea.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,11 @@ export class EmojiArea extends View {
}

private handleCategorySelect(category: CategoryKey, options?: SelectCategoryOptions) {

// On touch devices, if there is a "momentum scroll" in progress, we need to stop it so we can jump to the selected category
this.el.style.overflow = 'hidden';
this.selectCategory(category, options);
this.el.style.overflow = 'auto';
}

private createCategory(category: Category): EmojiCategory {
Expand Down

0 comments on commit 3b37070

Please sign in to comment.