Skip to content

Commit 12042db

Browse files
authored
Merge pull request #41298 from bernhardoj/fix/40461-main-composer-show-when-opening-emoji-picker
Fix main composer shows briefly when opening emoji picker
2 parents c19eea6 + fcb6674 commit 12042db

File tree

6 files changed

+7
-8
lines changed

6 files changed

+7
-8
lines changed

src/components/HeaderWithBackButton/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ function HeaderWithBackButton({
160160
style={[styles.touchableButtonImage]}
161161
role="button"
162162
accessibilityLabel={translate('common.back')}
163-
nativeID={CONST.BACK_BUTTON_NATIVE_ID}
163+
id={CONST.BACK_BUTTON_NATIVE_ID}
164164
>
165165
<Icon
166166
src={Expensicons.BackArrow}

src/components/OptionRow.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ function OptionRow({
163163
needsOffscreenAlphaCompositing
164164
>
165165
<PressableWithFeedback
166-
nativeID={keyForList}
166+
id={keyForList}
167167
ref={pressableRef}
168168
onPress={(e) => {
169169
if (!onSelectRow) {

src/components/Pressable/GenericPressable/index.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,13 @@ function WebGenericPressable({focusable = true, ...props}: PressableProps, ref:
1616
focusable={focusable}
1717
tabIndex={props.tabIndex ?? (!accessible || !focusable) ? -1 : 0}
1818
role={(props.accessibilityRole ?? props.role) as Role}
19-
id={props.nativeID}
19+
id={props.id}
2020
aria-label={props.accessibilityLabel}
2121
aria-labelledby={props.accessibilityLabelledBy}
2222
aria-valuenow={props.accessibilityValue?.now}
2323
aria-valuemin={props.accessibilityValue?.min}
2424
aria-valuemax={props.accessibilityValue?.max}
2525
aria-valuetext={props.accessibilityValue?.text}
26-
nativeID={props.nativeID}
2726
dataSet={{tag: 'pressable', ...(props.noDragArea && {dragArea: false}), ...props.dataSet}}
2827
/>
2928
);

src/components/SelectionList/BaseListItem.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ function BaseListItem<TItem extends ListItem>({
7979
hoverStyle={[!item.isDisabled && styles.hoveredComponentBG, hoverStyle]}
8080
dataSet={{[CONST.SELECTION_SCRAPER_HIDDEN_ELEMENT]: true}}
8181
onMouseDown={shouldPreventDefaultFocusOnSelectRow ? (e) => e.preventDefault() : undefined}
82-
nativeID={keyForList ?? ''}
82+
id={keyForList ?? ''}
8383
style={pressableStyle}
8484
onFocus={onFocus}
8585
>

src/libs/Navigation/AppNavigator/Navigators/Overlay/BaseOverlay.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ function BaseOverlay({shouldUseNativeStyles, onPress, isModalOnTheLeft = false}:
3434
onPress={onPress}
3535
accessibilityLabel={translate('common.close')}
3636
role={CONST.ROLE.BUTTON}
37-
nativeID={CONST.OVERLAY.TOP_BUTTON_NATIVE_ID}
37+
id={CONST.OVERLAY.TOP_BUTTON_NATIVE_ID}
3838
tabIndex={-1}
3939
/>
4040
<PressableWithoutFeedback
@@ -43,7 +43,7 @@ function BaseOverlay({shouldUseNativeStyles, onPress, isModalOnTheLeft = false}:
4343
accessibilityLabel={translate('common.close')}
4444
role={CONST.ROLE.BUTTON}
4545
noDragArea
46-
nativeID={CONST.OVERLAY.BOTTOM_BUTTON_NATIVE_ID}
46+
id={CONST.OVERLAY.BOTTOM_BUTTON_NATIVE_ID}
4747
tabIndex={-1}
4848
/>
4949
</View>

src/pages/home/report/ReportActionItemMessageEdit.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -450,7 +450,7 @@ function ReportActionItemMessageEdit(
450450
setIsFocused(false);
451451
// @ts-expect-error TODO: TextInputFocusEventData doesn't contain relatedTarget.
452452
const relatedTargetId = event.nativeEvent?.relatedTarget?.id;
453-
if (relatedTargetId && [messageEditInput, emojiButtonID].includes(relatedTargetId)) {
453+
if ((relatedTargetId && [messageEditInput, emojiButtonID].includes(relatedTargetId)) || EmojiPickerAction.isEmojiPickerVisible()) {
454454
return;
455455
}
456456
setShouldShowComposeInputKeyboardAware(true);

0 commit comments

Comments
 (0)