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

Added enter to insert new line on mobile instead of default. #1475

Merged
merged 8 commits into from
Sep 27, 2024

Conversation

natecard
Copy link
Contributor

Fix #1471 for mobile users to add a new line to their messages.

@nsarrazin
Copy link
Collaborator

Hey, thanks a lot for opening a PR for this. Will review it!

Copy link
Collaborator

@nsarrazin nsarrazin left a comment

Choose a reason for hiding this comment

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

Left a small comment but otherwise should be good!

src/lib/components/chat/ChatInput.svelte Outdated Show resolved Hide resolved
Copy link
Collaborator

@nsarrazin nsarrazin left a comment

Choose a reason for hiding this comment

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

I modified a few things, mostly i'm now detecting virtual keyboards instead of relying on viewport width. This should help detecting touchscreens with wider screens as well, other than that lgtm! 🚀

@nsarrazin nsarrazin merged commit c1bac2c into huggingface:main Sep 27, 2024
3 checks passed
ice91 pushed a commit to ice91/chat-ui that referenced this pull request Oct 30, 2024
…face#1475)

* Added enter to insert new line on mobile instead of default.

* fix: lint

* Removed unnecessary if statement

* feat: use virtual keyboard detection instead of viewport width

---------

Co-authored-by: Nathan Sarrazin <[email protected]>
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.

Remap enter button in mobile keyboards to add new line
2 participants