diff --git a/src/view/com/composer/drafts/DraftsListDialog.tsx b/src/view/com/composer/drafts/DraftsListDialog.tsx index 0ee587a434..138337c8c0 100644 --- a/src/view/com/composer/drafts/DraftsListDialog.tsx +++ b/src/view/com/composer/drafts/DraftsListDialog.tsx @@ -1,5 +1,5 @@ import {useCallback, useEffect, useMemo} from 'react' -import {View} from 'react-native' +import {Keyboard, View} from 'react-native' import {msg, Trans} from '@lingui/macro' import {useLingui} from '@lingui/react' @@ -54,6 +54,12 @@ export function DraftsListDialog({ const handleSelectDraft = useCallback( (summary: DraftSummary) => { + // Dismiss keyboard immediately to prevent flicker. Without this, + // the text input regains focus (showing the keyboard) after the + // drafts sheet closes, then loses it again when the post component + // remounts with the draft content, causing a show-hide-show cycle -sfn + Keyboard.dismiss() + control.close(() => { onSelectDraft(summary) })