Skip to content

Commit 6006a79

Browse files
committed
Revert "Merge pull request #82507 from NJ-2020/fix/selection-bug-37447"
This reverts commit 4d9781e, reversing changes made to 9b4ebcb.
1 parent 85ec2f5 commit 6006a79

5 files changed

Lines changed: 4 additions & 211 deletions

File tree

patches/react-native-web/details.md

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -134,13 +134,3 @@
134134
- Upstream PR/issue: https://github.com/necolas/react-native-web/issues/2817
135135
- E/App issue: https://github.com/Expensify/App/issues/73782
136136
- PR introducing patch: https://github.com/Expensify/App/pull/76332
137-
138-
### [react-native-web+0.21.2+013+fix-selection-bug.patch](react-native-web+0.21.2+013+fix-selection-bug.patch)
139-
140-
- Reason:
141-
```
142-
Fix selection bug for InvertedFlatlist by reversing the DOM tree elements using `pushOrUnshift` method
143-
```
144-
- Upstream PR/issue: https://github.com/necolas/react-native-web/issues/1807, it has been closed because of [this](https://github.com/necolas/react-native-web/issues/1807#issuecomment-725689704)
145-
- E/App issue: https://github.com/Expensify/App/issues/37447
146-
- PR introducing patch: https://github.com/Expensify/App/pull/82507

patches/react-native-web/react-native-web+0.21.2+013+fix-selection-bug.patch

Lines changed: 0 additions & 194 deletions
This file was deleted.

src/components/ActionSheetAwareScrollView/index.tsx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,18 @@
22
// On all other platforms, the action sheet is implemented using the Animated.ScrollView
33
import React from 'react';
44
import Reanimated from 'react-native-reanimated';
5-
import useThemeStyles from '@hooks/useThemeStyles';
65
import {Actions, ActionSheetAwareScrollViewProvider, useActionSheetAwareScrollViewActions, useActionSheetAwareScrollViewState} from './ActionSheetAwareScrollViewContext';
76
import type {ActionSheetAwareScrollViewProps, RenderActionSheetAwareScrollViewComponent} from './types';
87
import useActionSheetAwareScrollViewRef from './useActionSheetAwareScrollViewRef';
98

109
function ActionSheetAwareScrollView({children, ref, ...restProps}: ActionSheetAwareScrollViewProps) {
1110
const {onRef} = useActionSheetAwareScrollViewRef(ref);
12-
const styles = useThemeStyles();
1311

1412
return (
1513
<Reanimated.ScrollView
1614
// eslint-disable-next-line react/jsx-props-no-spreading
1715
{...restProps}
1816
ref={onRef}
19-
contentContainerStyle={[restProps.contentContainerStyle, restProps.horizontal ? styles.flexRowReverse : styles.flexColumnReverse, styles.justifyContentEnd]}
2017
>
2118
{children}
2219
</Reanimated.ScrollView>

src/components/FlatList/FlatList/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,15 +112,15 @@ function MVCPFlatList<T>({
112112

113113
const contentViewLength = contentView.childNodes.length;
114114
for (let i = mvcpMinIndexForVisible; i < contentViewLength; i++) {
115-
const subview = contentView.childNodes[restProps.inverted ? contentViewLength - i - 1 : i] as HTMLElement;
115+
const subview = contentView.childNodes[i] as HTMLElement;
116116
const subviewOffset = horizontal ? subview.offsetLeft : subview.offsetTop;
117117
if (subviewOffset > scrollOffset) {
118118
prevFirstVisibleOffsetRef.current = subviewOffset;
119119
firstVisibleViewRef.current = subview;
120120
break;
121121
}
122122
}
123-
}, [getContentView, getScrollOffset, mvcpMinIndexForVisible, horizontal, restProps.inverted]);
123+
}, [getContentView, getScrollOffset, mvcpMinIndexForVisible, horizontal]);
124124

125125
const adjustForMaintainVisibleContentPosition = useCallback(
126126
(animated = true) => {

src/pages/inbox/report/PureReportActionItem.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import {deepEqual} from 'fast-equals';
33
import mapValues from 'lodash/mapValues';
44
import React, {memo, use, useCallback, useContext, useEffect, useMemo, useRef, useState} from 'react';
55
import type {GestureResponderEvent, TextInput} from 'react-native';
6-
import {InteractionManager, Keyboard, Platform, View} from 'react-native';
6+
import {InteractionManager, Keyboard, View} from 'react-native';
77
import type {OnyxCollection, OnyxEntry} from 'react-native-onyx';
88
import type {ValueOf} from 'type-fest';
99
import type {Emoji} from '@assets/emojis/types';
@@ -2056,7 +2056,7 @@ function PureReportActionItem({
20562056
withoutFocusOnSecondaryInteraction
20572057
accessibilityLabel={accessibilityLabel}
20582058
accessibilityHint={translate('accessibilityHints.chatMessage')}
2059-
accessibilityRole={Platform.OS !== CONST.PLATFORM.WEB ? CONST.ROLE.BUTTON : undefined}
2059+
accessibilityRole={CONST.ROLE.BUTTON}
20602060
sentryLabel={CONST.SENTRY_LABEL.REPORT.PURE_REPORT_ACTION_ITEM}
20612061
>
20622062
<Hoverable

0 commit comments

Comments
 (0)