diff --git a/app/soapbox/features/emoji/components/emoji-picker-dropdown.tsx b/app/soapbox/features/emoji/components/emoji-picker-dropdown.tsx index 7f622835c..93100a39c 100644 --- a/app/soapbox/features/emoji/components/emoji-picker-dropdown.tsx +++ b/app/soapbox/features/emoji/components/emoji-picker-dropdown.tsx @@ -226,6 +226,10 @@ const EmojiPickerDropdown: React.FC = ({ } }, [visible]); + useEffect(() => () => { + document.body.style.overflow = ''; + }, []); + return ( visible ? ( diff --git a/app/soapbox/features/emoji/containers/emoji-picker-dropdown-container.tsx b/app/soapbox/features/emoji/containers/emoji-picker-dropdown-container.tsx index f9b7150c4..c097e6056 100644 --- a/app/soapbox/features/emoji/containers/emoji-picker-dropdown-container.tsx +++ b/app/soapbox/features/emoji/containers/emoji-picker-dropdown-container.tsx @@ -16,7 +16,7 @@ export const messages = defineMessages({ emoji: { id: 'emoji_button.label', defaultMessage: 'Insert emoji' }, }); -const EmojiPickerDropdownWrapper = ( +const EmojiPickerDropdownContainer = ( props: Pick, ) => { const intl = useIntl(); @@ -53,7 +53,7 @@ const EmojiPickerDropdownWrapper = ( document.addEventListener('click', handleDocClick, false); document.addEventListener('touchend', handleDocClick, listenerOptions); - return function cleanup() { + return () => { document.removeEventListener('click', handleDocClick, false); // @ts-ignore document.removeEventListener('touchend', handleDocClick, listenerOptions); @@ -93,4 +93,4 @@ const EmojiPickerDropdownWrapper = ( }; -export default EmojiPickerDropdownWrapper; +export default EmojiPickerDropdownContainer; diff --git a/app/soapbox/locales/en.json b/app/soapbox/locales/en.json index ddbc0ae9e..227e77404 100644 --- a/app/soapbox/locales/en.json +++ b/app/soapbox/locales/en.json @@ -631,6 +631,9 @@ "emoji_button.oh_no": "Oh no!", "emoji_button.people": "People", "emoji_button.pick": "Pick an emoji…", + "emoji_button.recent": "Frequently used", + "emoji_button.search": "Search…", + "emoji_button.search_results": "Search results", "emoji_button.skins_1": "Default", "emoji_button.skins_2": "Light", "emoji_button.skins_3": "Medium-Light", @@ -638,9 +641,6 @@ "emoji_button.skins_5": "Medium-Dark", "emoji_button.skins_6": "Dark", "emoji_button.skins_choose": "Choose default skin tone", - "emoji_button.recent": "Frequently used", - "emoji_button.search": "Search…", - "emoji_button.search_results": "Search results", "emoji_button.symbols": "Symbols", "emoji_button.travel": "Travel & Places", "empty_column.account_blocked": "You are blocked by @{accountUsername}.",