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

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

Open
jalesmonteiro opened this issue Jun 14, 2015 · 1 comment · May be fixed by #17

Comments

@jalesmonteiro
Copy link

No description provided.

@okaybenji okaybenji linked a pull request Aug 21, 2015 that will close this issue
@okaybenji
Copy link
Collaborator

When the full string in the invisible input box does not fit in the visible CanvasInput and one of the following occurs:

*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

What would be visible in the invisible input box and what is actually visible in the CanvasInput get out of sync. In each of these cases, any edits a user makes to the string will have unexpected results. This is because the clipText function assumes that only the last characters of the oversized string should ever be displayed.

For instance, when the input loses focus, the invisible DOM input's 'visible' text shifts to display only the beginning of the oversized string. Clicking the CanvasInput at this point would place the cursor somewhere in that first chunk of the string, but the cursor would appear to be somewhere in the last chunk of the string.

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 a pull request may close this issue.

2 participants