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

With Third party keyboard the backspace is not working. #53

Open
suhailwy opened this issue Feb 25, 2015 · 5 comments
Open

With Third party keyboard the backspace is not working. #53

suhailwy opened this issue Feb 25, 2015 · 5 comments

Comments

@suhailwy
Copy link

  • (void)textFieldDidEnterBackspace:(VENBackspaceTextField *)textField;
    is not getting called on "x" button for third party keyboard, so deleting any token is not possible at all in such case.
@ayanonagon
Copy link
Contributor

Thanks for the report, we’ll look into it as soon as we can.

@suhailwy
Copy link
Author

well i have patched this issue, it happens if we are subclassing the text field.
You can modify the code in VENTOKENFIELD.m to

(BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string { BOOL isPressedBackspaceAfterSingleSpaceSymbol = [textField.text isEqualToString:@""] && range.location == 0 && range.length == 0 && string.length == 0; if (isPressedBackspaceAfterSingleSpaceSymbol) { if ([self respondsToSelector:@selector(textFieldDidEnterBackspace:)]) { [self textFieldDidEnterBackspace:self.inputTextField]; } }else { [self unhighlightAllTokens]; } return YES; }

@nikolayv
Copy link

nikolayv commented Feb 8, 2018

We really wish this wasn't still broken!

@dmiluski
Copy link

dmiluski commented Feb 9, 2018

Which keyboard are you using?
Is it accurately reporting delete key?

@jaltreuter
Copy link

I can reproduce this issue as well, using Gboard on iOS 11 and 12, in my own app and in the Venmo app.

Raw text can be deleted, but tokens cannot. If the text field has a token in it and my cursor is just to the right of it, tapping the backspace key does nothing. If I tap the token to highlight it, tapping the backspace key still does nothing. If I switch to the system keyboard, tapping backspace twice will highlight and then delete the token, as expected.

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

No branches or pull requests

5 participants