mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Fix negative zoomScale in RTL
Summary: Changelog: [iOS][Fixed] - When in an RTL locale on iOS, e.nativeEvent.zoomScale is -1. This seems to cause erratic blank spaces that don't recover as you scroll. Taking Math.abs of the value fixes it. Blame: D36169686 (https://github.com/facebook/react-native/commit/13a72e0ccceb2db6aeacd03b4f429d200392c17b) Differential Revision: D36468390 fbshipit-source-id: f18244f1421fc1ccbb0d1035df8a7c6de10ccf62
This commit is contained in:
committed by
Facebook GitHub Bot
parent
35e2a63b8d
commit
2f491bfa9f
@@ -1627,7 +1627,8 @@ class VirtualizedList extends React.PureComponent<Props, State> {
|
||||
this._hasWarned.perf = true;
|
||||
}
|
||||
|
||||
const zoomScale = e.nativeEvent.zoomScale;
|
||||
// e.nativeEvent.zoomScale is -1 in RTL so take absolute
|
||||
const zoomScale = Math.abs(e.nativeEvent.zoomScale);
|
||||
|
||||
this._scrollMetrics = {
|
||||
contentLength,
|
||||
|
||||
Reference in New Issue
Block a user