react-native-macos 0.71.21 → 0.71.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Libraries/Core/ReactNativeVersion.js +1 -1
- package/React/Base/RCTVersion.m +1 -1
- package/React/Views/ScrollView/RCTScrollView.m +18 -0
- package/ReactAndroid/gradle.properties +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java +1 -1
- package/ReactCommon/cxxreact/ReactNativeVersion.h +1 -1
- package/package.json +3 -1
- package/template/package.json +1 -1
package/React/Base/RCTVersion.m
CHANGED
|
@@ -382,6 +382,7 @@
|
|
|
382
382
|
BOOL _allowNextScrollNoMatterWhat;
|
|
383
383
|
#if TARGET_OS_OSX // [macOS
|
|
384
384
|
BOOL _notifyDidScroll;
|
|
385
|
+
NSPoint _lastScrollPosition;
|
|
385
386
|
#endif // macOS]
|
|
386
387
|
CGRect _lastClippedToRect;
|
|
387
388
|
uint16_t _coalescingKey;
|
|
@@ -477,6 +478,7 @@ static inline UIViewAnimationOptions animationOptionsWithCurve(UIViewAnimationCu
|
|
|
477
478
|
#else // [macOS
|
|
478
479
|
_scrollView.drawsBackground = NO;
|
|
479
480
|
_scrollView.postsBoundsChangedNotifications = YES;
|
|
481
|
+
_lastScrollPosition = NSZeroPoint;
|
|
480
482
|
#endif // macOS]
|
|
481
483
|
|
|
482
484
|
#if !TARGET_OS_OSX // [macOS]
|
|
@@ -925,6 +927,22 @@ RCT_SCROLL_EVENT_HANDLER(scrollViewDidScrollToTop, onScrollToTop)
|
|
|
925
927
|
{
|
|
926
928
|
NSTimeInterval now = CACurrentMediaTime();
|
|
927
929
|
[self updateClippedSubviews];
|
|
930
|
+
|
|
931
|
+
#if TARGET_OS_OSX // [macOS
|
|
932
|
+
/**
|
|
933
|
+
* To check for effective scroll position changes, the comparison with lastScrollPosition should happen
|
|
934
|
+
* after updateClippedSubviews. updateClippedSubviews will update the display of the vertical/horizontal
|
|
935
|
+
* scrollers which can change the clipview bounds.
|
|
936
|
+
* This change also ensures that no onScroll events are sent when the React setFrame call is running,
|
|
937
|
+
* which could submit onScroll events while the content view was not setup yet.
|
|
938
|
+
*/
|
|
939
|
+
BOOL didScroll = !NSEqualPoints(scrollView.contentView.bounds.origin, _lastScrollPosition);
|
|
940
|
+
if (!didScroll) {
|
|
941
|
+
return;
|
|
942
|
+
}
|
|
943
|
+
_lastScrollPosition = scrollView.contentView.bounds.origin;
|
|
944
|
+
#endif // macOS]
|
|
945
|
+
|
|
928
946
|
/**
|
|
929
947
|
* TODO: this logic looks wrong, and it may be because it is. Currently, if _scrollEventThrottle
|
|
930
948
|
* is set to zero (the default), the "didScroll" event is only sent once per scroll, instead of repeatedly
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-macos",
|
|
3
|
-
"version": "0.71.
|
|
3
|
+
"version": "0.71.23",
|
|
4
4
|
"bin": "./cli.js",
|
|
5
5
|
"description": "React Native for macOS",
|
|
6
6
|
"license": "MIT",
|
|
@@ -202,6 +202,7 @@
|
|
|
202
202
|
"shouldPublish": false
|
|
203
203
|
},
|
|
204
204
|
"resolutions": {
|
|
205
|
+
"@grpc/proto-loader": "^0.7.8",
|
|
205
206
|
"async": "^3.2.2",
|
|
206
207
|
"debug": ">=3.1.0",
|
|
207
208
|
"es5-ext": "0.10.53",
|
|
@@ -211,6 +212,7 @@
|
|
|
211
212
|
"tough-cookie": "^4.1.3"
|
|
212
213
|
},
|
|
213
214
|
"_justification": {
|
|
215
|
+
"@grpc/proto-loader": "Resolves a security issue with protobufjs, one of its dependencies",
|
|
214
216
|
"async": "Versions of async prior to 3.2.2 are vulnerable to prototype pollution",
|
|
215
217
|
"debug": "ReDoS vulnerability in older versions, plus the dependents that pull in debug@<1.0.0 haven't been updated in years",
|
|
216
218
|
"es5-ext": "Packages after 0.10.54 and at the moment up until 0.10.59 contain a protest message. A policy prevents us from using packages with protestware, therefore downgrading to the latest release without the message.",
|