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

Auto size font on overflow #17

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

Conversation

okaybenji
Copy link
Collaborator

Suggesting shrinking font when text overflows. This fixes issue which causes rendered CanvasInput to be out of sync with the actual input box in the following situations:

  • Cmd+Arrow / Home / End key text cursor navigation
  • Arrow key text cursor navigation
  • Repositioning text cursor with mouse click
  • Refocusing on CanvasInput with mouse click

Fixes #4

Note: Please be sure to update semver on this branch before merging.

@goldfire
Copy link
Owner

I think this may require some more thought since the goal of CanvasInput is technically to mimic a DOM input. After playing around with this, it seems to cause UX issues in some cases. However, this could be good to add as an option since I could see the benefit in some scenarios.

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.

When I press home key, if the text is bigger that the input, the displayed text doesn't go to home.
2 participants