Bluesky app fork with some witchin' additions 💫

Fix keyboard flicker when selecting a draft in composer (#9864)

authored by samuel.fm and committed by

GitHub c46219bc 6d68a5bd

+7 -1
+7 -1
src/view/com/composer/drafts/DraftsListDialog.tsx
··· 1 1 import {useCallback, useEffect, useMemo} from 'react' 2 - import {View} from 'react-native' 2 + import {Keyboard, View} from 'react-native' 3 3 import {msg, Trans} from '@lingui/macro' 4 4 import {useLingui} from '@lingui/react' 5 5 ··· 54 54 55 55 const handleSelectDraft = useCallback( 56 56 (summary: DraftSummary) => { 57 + // Dismiss keyboard immediately to prevent flicker. Without this, 58 + // the text input regains focus (showing the keyboard) after the 59 + // drafts sheet closes, then loses it again when the post component 60 + // remounts with the draft content, causing a show-hide-show cycle -sfn 61 + Keyboard.dismiss() 62 + 57 63 control.close(() => { 58 64 onSelectDraft(summary) 59 65 })