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

Backspace error with input using text-align: right; #628

Closed
obermillerk opened this issue Dec 1, 2017 · 2 comments
Closed

Backspace error with input using text-align: right; #628

obermillerk opened this issue Dec 1, 2017 · 2 comments
Labels

Comments

@obermillerk
Copy link

Expected Behavior

Say I have an input element, text-align is set to right, and I have the text my input element input into it. I position my caret to the left of the word input (my |input element) and start pressing backspace. The text my should be deleted, and all subsequent backspace actions after these three characters should do nothing, leaving the caret positioned at the left of the input and resulting in the text input element.

Actual behavior

What actually happens is that once my has been deleted, when the text equals input element and the caret is located at the far left (in other words, after three backspace presses), the next time backspace is pressed the caret jumps to the far right of the input and subsequent backspaces continue to delete the rest of the text. This behavior happens whether using the virtual keyboard or a physical keyboard, just so long as the virtual keyboard is activated on the input.

I have created a fiddle forked from your playground fiddle that demonstrates this. You can use the first text box to see the behavior with the virtual keyboard (using either physical or virtual keyboard), and the second (non-styled, no virtual keyboard) text box to see the expected behavior.

@Mottie
Copy link
Owner

Mottie commented Dec 1, 2017

Hi @obermillerk!

Thanks for reporting this issue! I'll get it fixed shortly.

@Mottie Mottie added the Bug label Dec 1, 2017
@Mottie Mottie closed this as completed in 3b9cfbf Dec 1, 2017
@obermillerk
Copy link
Author

Wow, that was fast...

Thanks, I can confirm that it's fixed! Cool library, by the way. 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants