Skip to content

Commit

Permalink
Reapply "Merge pull request Expensify#42965 from suneox/40767-handle-…
Browse files Browse the repository at this point in the history
…edit-last-message"

This reverts commit 747fe19.
  • Loading branch information
mananjadhav committed Jun 6, 2024
1 parent 747fe19 commit 8c0912a
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/pages/home/report/ReportActionItemMessageEdit.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {ExpensiMark} from 'expensify-common';
import lodashDebounce from 'lodash/debounce';
import type {ForwardedRef} from 'react';
import React, {forwardRef, useCallback, useEffect, useMemo, useRef, useState} from 'react';
import {Keyboard, View} from 'react-native';
import {InteractionManager, Keyboard, View} from 'react-native';
import type {NativeSyntheticEvent, TextInput, TextInputFocusEventData, TextInputKeyPressEventData} from 'react-native';
import {useOnyx} from 'react-native-onyx';
import type {Emoji} from '@assets/emojis/types';
Expand Down Expand Up @@ -406,7 +406,11 @@ function ReportActionItemMessageEdit(
style={[styles.textInputCompose, styles.flex1, styles.bgTransparent]}
onFocus={() => {
setIsFocused(true);
reportScrollManager.scrollToIndex(index, true);
InteractionManager.runAfterInteractions(() => {
requestAnimationFrame(() => {
reportScrollManager.scrollToIndex(index, true);
});
});
setShouldShowComposeInputKeyboardAware(false);

// Clear active report action when another action gets focused
Expand Down

0 comments on commit 8c0912a

Please sign in to comment.