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

Caret positioning & scrolling on enter #247

Merged
merged 1 commit into from
Mar 27, 2024

Conversation

BartoszGrajdek
Copy link
Collaborator

Details

This PR fixes weird cursor / scrolling behaviour where you press enter and input doesn't scroll or is scrolling incorrectly

Related Issues

GH_LINK

Manual Tests

Test in 2 scenarios:

  1. Default example app
  2. With defined numberOfLines in example/src/App.tsx

Check how scrolling/cursor behaves when you:

  1. Add enter in front of line of text / markdown block
  2. Add enter after line of text / markdown block
  3. Add enter at the end of input
  4. Add enter at the beginning of input

Linked PRs

Expensify/App#38152

@BartoszGrajdek
Copy link
Collaborator Author

I still need to test it in the Expensify App, but there shouldn't be any problems so this PR is open to review

Comment on lines +48 to +49
'es/no-nullish-coalescing-operators': 'off',
'es/no-optional-chaining': 'off',
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These rules are already disabled in the Expensify app, so we don't need them

@BartoszGrajdek BartoszGrajdek changed the title feat: fix caret positioning Caret positioning / scrolling on enter Mar 27, 2024
@BartoszGrajdek BartoszGrajdek changed the title Caret positioning / scrolling on enter Caret positioning & scrolling on enter Mar 27, 2024
@BartoszGrajdek
Copy link
Collaborator Author

Tested in Expensify and it's working fine now ✅

Copy link
Collaborator

@Skalakid Skalakid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@BartoszGrajdek BartoszGrajdek merged commit 012ec8b into main Mar 27, 2024
2 checks passed
@BartoszGrajdek BartoszGrajdek deleted the @BartoszGrajdek/caret-position-on-enter branch March 27, 2024 16:16
BartoszGrajdek added a commit that referenced this pull request Mar 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants