Skip to content

Commit

Permalink
Merge pull request #40960 from bernhardoj/fix/33502-enter-pressable-bug
Browse files Browse the repository at this point in the history
Update rn-web to 0.19.12
  • Loading branch information
neil-marcellini committed May 29, 2024
2 parents db7fa86 + fc549e8 commit d875e80
Show file tree
Hide file tree
Showing 9 changed files with 25 additions and 36 deletions.
14 changes: 10 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@
"react-native-url-polyfill": "^2.0.0",
"react-native-view-shot": "3.8.0",
"react-native-vision-camera": "^4.0.0-beta.13",
"react-native-web": "^0.19.9",
"react-native-web": "^0.19.12",
"react-native-web-linear-gradient": "^1.1.2",
"react-native-web-sound": "^0.1.3",
"react-native-webview": "13.6.4",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
diff --git a/node_modules/react-native-web/dist/vendor/react-native/VirtualizedList/index.js b/node_modules/react-native-web/dist/vendor/react-native/VirtualizedList/index.js
index c879838..0c9dfcb 100644
index e137def..c3e5054 100644
--- a/node_modules/react-native-web/dist/vendor/react-native/VirtualizedList/index.js
+++ b/node_modules/react-native-web/dist/vendor/react-native/VirtualizedList/index.js
@@ -285,7 +285,7 @@ class VirtualizedList extends StateSafePureComponent {
// $FlowFixMe[missing-local-annot]
// REACT-NATIVE-WEB patch to preserve during future RN merges: Support inverted wheel scroller.

constructor(_props) {
- var _this$props$updateCel;
Expand Down Expand Up @@ -243,7 +243,7 @@ index c879838..0c9dfcb 100644
});
this._hasMore = this.state.cellsAroundViewport.last < itemCount - 1;
var innerRet = /*#__PURE__*/React.createElement(VirtualizedListContextProvider, {
@@ -1307,8 +1360,12 @@ class VirtualizedList extends StateSafePureComponent {
@@ -1317,8 +1370,12 @@ class VirtualizedList extends StateSafePureComponent {
onStartReached = _this$props8.onStartReached,
onStartReachedThreshold = _this$props8.onStartReachedThreshold,
onEndReached = _this$props8.onEndReached,
Expand All @@ -258,7 +258,7 @@ index c879838..0c9dfcb 100644
var _this$_scrollMetrics2 = this._scrollMetrics,
contentLength = _this$_scrollMetrics2.contentLength,
visibleLength = _this$_scrollMetrics2.visibleLength,
@@ -1348,16 +1405,10 @@ class VirtualizedList extends StateSafePureComponent {
@@ -1358,16 +1415,10 @@ class VirtualizedList extends StateSafePureComponent {
// and call onStartReached only once for a given content length,
// and only if onEndReached is not being executed
else if (onStartReached != null && this.state.cellsAroundViewport.first === 0 && isWithinStartThreshold && this._scrollMetrics.contentLength !== this._sentStartForContentLength) {
Expand All @@ -279,9 +279,9 @@ index c879838..0c9dfcb 100644
}

// If the user scrolls away from the start or end and back again,
@@ -1412,6 +1463,11 @@ class VirtualizedList extends StateSafePureComponent {
}
}
@@ -1433,6 +1484,11 @@ class VirtualizedList extends StateSafePureComponent {
*/

_updateViewableItems(props, cellsAroundViewport) {
+ // If we have any pending scroll updates it means that the scroll metrics
+ // are out of date and we should not call any of the visibility callbacks.
Expand All @@ -292,7 +292,7 @@ index c879838..0c9dfcb 100644
tuple.viewabilityHelper.onUpdate(props, this._scrollMetrics.offset, this._scrollMetrics.visibleLength, this._getFrameMetrics, this._createViewToken, tuple.onViewableItemsChanged, cellsAroundViewport);
});
diff --git a/node_modules/react-native-web/src/vendor/react-native/VirtualizedList/index.js b/node_modules/react-native-web/src/vendor/react-native/VirtualizedList/index.js
index c7d68bb..43f9653 100644
index c7d68bb..459f017 100644
--- a/node_modules/react-native-web/src/vendor/react-native/VirtualizedList/index.js
+++ b/node_modules/react-native-web/src/vendor/react-native/VirtualizedList/index.js
@@ -75,6 +75,10 @@ type ViewabilityHelperCallbackTuple = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
diff --git a/node_modules/react-native-web/dist/exports/Image/index.js b/node_modules/react-native-web/dist/exports/Image/index.js
index 95355d5..19109fc 100644
index 9649d27..3281cc8 100644
--- a/node_modules/react-native-web/dist/exports/Image/index.js
+++ b/node_modules/react-native-web/dist/exports/Image/index.js
@@ -135,7 +135,22 @@ function resolveAssetUri(source) {
Expand All @@ -23,10 +23,10 @@ index 95355d5..19109fc 100644
+ return a.uri !== b.uri || JSON.stringify(a.headers) !== JSON.stringify(b.headers);
+}
+var BaseImage = /*#__PURE__*/React.forwardRef((props, ref) => {
var ariaLabel = props['aria-label'],
var _ariaLabel = props['aria-label'],
accessibilityLabel = props.accessibilityLabel,
blurRadius = props.blurRadius,
defaultSource = props.defaultSource,
@@ -236,16 +251,10 @@ var Image = /*#__PURE__*/React.forwardRef((props, ref) => {
@@ -238,16 +253,10 @@ var Image = /*#__PURE__*/React.forwardRef((props, ref) => {
}
}, function error() {
updateState(ERRORED);
Expand All @@ -47,7 +47,7 @@ index 95355d5..19109fc 100644
});
}
function abortPendingRequest() {
@@ -277,10 +286,78 @@ var Image = /*#__PURE__*/React.forwardRef((props, ref) => {
@@ -279,10 +288,78 @@ var Image = /*#__PURE__*/React.forwardRef((props, ref) => {
suppressHydrationWarning: true
}), hiddenImage, createTintColorSVG(tintColor, filterRef.current));
});
Expand Down Expand Up @@ -129,7 +129,7 @@ index 95355d5..19109fc 100644
ImageLoader.getSize(uri, success, failure);
};
diff --git a/node_modules/react-native-web/dist/modules/ImageLoader/index.js b/node_modules/react-native-web/dist/modules/ImageLoader/index.js
index bc06a87..e309394 100644
index bc06a87..5a22819 100644
--- a/node_modules/react-native-web/dist/modules/ImageLoader/index.js
+++ b/node_modules/react-native-web/dist/modules/ImageLoader/index.js
@@ -76,7 +76,7 @@ var ImageLoader = {
Expand Down
13 changes: 0 additions & 13 deletions patches/react-native-web+0.19.9+002+measureInWindow.patch

This file was deleted.

4 changes: 0 additions & 4 deletions src/components/Button/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -302,10 +302,6 @@ function Button(
currentTarget?.blur();
}

if (event?.type === 'keyup') {
return;
}

if (shouldEnableHapticFeedback) {
HapticFeedback.press();
}
Expand Down

0 comments on commit d875e80

Please sign in to comment.