Skip to content

Commit

Permalink
fix: improve comment
Browse files Browse the repository at this point in the history
  • Loading branch information
nolanlawson committed Dec 18, 2022
1 parent 470e5c4 commit 4ed924b
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 1 deletion.
1 change: 1 addition & 0 deletions src/picker/components/Picker/Picker.js
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,7 @@ $: {
requestAnimationFrame(() => checkZwjSupportAndUpdate(zwjEmojisToCheck))
} else {
currentEmojis = currentEmojis.filter(isZwjSupported)
// Reset scroll top to 0 when emojis change
requestAnimationFrame(() => resetScrollTopIfPossible(tabpanelElement))
}
}
Expand Down
1 change: 0 additions & 1 deletion src/picker/utils/resetScrollTopIfPossible.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// Reset scroll top to 0 when emojis change
// Note we put this in its own function outside Picker.js to avoid Svelte doing an invalidation on the "setter" here.
// At best the invalidation is useless, at worst it can cause infinite loops:
// https://github.com/nolanlawson/emoji-picker-element/pull/180
Expand Down

0 comments on commit 4ed924b

Please sign in to comment.