CanvasInput
CanvasInput copied to clipboard
Auto size font on overflow
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.
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.