Skip to content

Commit

Permalink
Fix issue with RTL locales and zoomScale
Browse files Browse the repository at this point in the history
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. Set the value to 1 instead when negative.

Differential Revision: D36499121

fbshipit-source-id: f82812ca00ae4162fbff617df8c716a4964b3a8f
  • Loading branch information
Blair Vanderhoof authored and facebook-github-bot committed May 21, 2022
1 parent 6838dab commit bc7b5c3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Libraries/Lists/VirtualizedList.js
Original file line number Diff line number Diff line change
Expand Up @@ -1627,8 +1627,8 @@ class VirtualizedList extends React.PureComponent<Props, State> {
this._hasWarned.perf = true;
}

const zoomScale = e.nativeEvent.zoomScale;

// For invalid negative values (w/ RTL), set this to 1.
const zoomScale = e.nativeEvent.zoomScale < 0 ? 1 : e.nativeEvent.zoomScale;
this._scrollMetrics = {
contentLength,
dt,
Expand Down

0 comments on commit bc7b5c3

Please sign in to comment.