Skip to content

Commit 2e0c6b8

Browse files
committed
Fix: comments for viewport changes
1 parent f5c3b01 commit 2e0c6b8

File tree

1 file changed

+3
-4
lines changed
  • packages/react-native-web/src/exports/Dimensions

1 file changed

+3
-4
lines changed

packages/react-native-web/src/exports/Dimensions/index.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,7 @@ export default class Dimensions {
8484
* iOS does not update viewport dimensions on keyboard open/close
8585
* So, we are using window.visualViewport(https://developer.mozilla.org/en-US/docs/Web/API/VisualViewport)
8686
* instead of document.documentElement.clientHeight
87-
* But we are still using document.documentElement.clientWidth as fallback
88-
* because it was requested by the original repo owner
87+
* document.documentElement.clientWidth is used as a fallback
8988
*/
9089
if (win.visualViewport) {
9190
const visualViewport = win.visualViewport;
@@ -144,8 +143,8 @@ export default class Dimensions {
144143

145144
if (canUseDOM) {
146145
/*
147-
* Same here as in _update method
148-
* keeping the previous implementation as fallback
146+
* Same as in _update method, we are
147+
* keeping the previous implementation as a fallback
149148
*/
150149
if (window.visualViewport) {
151150
window.visualViewport.addEventListener('resize', Dimensions._update, false);

0 commit comments

Comments
 (0)