Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Android] Improve consistency for overflowed TextInput #36428

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1069,7 +1069,16 @@ public WritableMap getStateUpdate() {
}

@Override
public void afterTextChanged(Editable s) {}
public void afterTextChanged(Editable s) {
if (!mEditText.hasFocus()) {
mEditText.post(new Runnable() {
@Override
public void run() {
mEditText.scrollTo(0, 0);
}
});
}
}
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1106,6 +1106,17 @@ module.exports = ([
);
},
},
{
title: 'Overflowed text behavior on render',
render: function (): React.Node {
return (
<TextInput
style={styles.default}
defaultValue="The quick brown fox expertly jumps over the lazy dog, lying still on the grass."
/>
);
},
},
{
title: 'Uncontrolled component with layout changes',
name: 'uncontrolledComponent',
Expand Down