Skip to content

Commit

Permalink
Merge pull request #48973 from bernhardoj/fix/48161-main-composer-doe…
Browse files Browse the repository at this point in the history
…snt-hide

Fix edit composer isn't focused
  • Loading branch information
youssef-lr authored Sep 23, 2024
2 parents a8e6a4f + 3e2b7d6 commit f8add4e
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 44 deletions.
26 changes: 0 additions & 26 deletions src/libs/focusTextInputAfterAnimation/index.android.ts

This file was deleted.

10 changes: 0 additions & 10 deletions src/libs/focusTextInputAfterAnimation/index.ts

This file was deleted.

5 changes: 0 additions & 5 deletions src/libs/focusTextInputAfterAnimation/types.ts

This file was deleted.

6 changes: 3 additions & 3 deletions src/pages/home/report/ReportActionItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ import useThemeStyles from '@hooks/useThemeStyles';
import ControlSelection from '@libs/ControlSelection';
import * as DeviceCapabilities from '@libs/DeviceCapabilities';
import * as ErrorUtils from '@libs/ErrorUtils';
import focusTextInputAfterAnimation from '@libs/focusTextInputAfterAnimation';
import focusComposerWithDelay from '@libs/focusComposerWithDelay';
import ModifiedExpenseMessage from '@libs/ModifiedExpenseMessage';
import Navigation from '@libs/Navigation/Navigation';
import Permissions from '@libs/Permissions';
Expand Down Expand Up @@ -199,7 +199,7 @@ function ReportActionItem({
const [moderationDecision, setModerationDecision] = useState<OnyxTypes.DecisionName>(CONST.MODERATION.MODERATOR_DECISION_APPROVED);
const reactionListRef = useContext(ReactionListContext);
const {updateHiddenAttachments} = useContext(ReportAttachmentsContext);
const textInputRef = useRef<TextInput | HTMLTextAreaElement>();
const textInputRef = useRef<TextInput | HTMLTextAreaElement>(null);
const popoverAnchorRef = useRef<Exclude<ReportActionContextMenu.ContextMenuAnchor, TextInput>>(null);
const downloadedPreviews = useRef<string[]>([]);
const prevDraftMessage = usePrevious(draftMessage);
Expand Down Expand Up @@ -274,7 +274,7 @@ function ReportActionItem({
return;
}

focusTextInputAfterAnimation(textInputRef.current, 100);
focusComposerWithDelay(textInputRef.current)(true);
}, [prevDraftMessage, draftMessage]);

useEffect(() => {
Expand Down

0 comments on commit f8add4e

Please sign in to comment.