Skip to content

Commit 111cc08

Browse files
committed
Add a comment about isLayoutRequested block
1 parent 42632b9 commit 111cc08

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactEditText.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,11 @@ public ReactEditText(Context context) {
9999
// TODO: t6408636 verify if we should schedule a layout after a View does a requestLayout()
100100
@Override
101101
public boolean isLayoutRequested() {
102+
// If we are watching and updating container height based on content size
103+
// then we don't want to scroll right away. This isn't perfect -- you might
104+
// want to limit the height the text input can grow to. Possible solution
105+
// is to add another prop that determines whether we should scroll to end
106+
// of text.
102107
if (mContentSizeWatcher != null) {
103108
return true;
104109
} else {

0 commit comments

Comments
 (0)