Skip to content

Remove autocomplete on single backspace #29

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

Merged
merged 1 commit into from
Feb 17, 2018
Merged

Conversation

SD10
Copy link
Member

@SD10 SD10 commented Feb 17, 2018

Improves GitHawkApp/GitHawk#1514

I did a little reverse engineering of Slack to figure out how they were dealing with this. The text after a mention is still highlighted for autocorrect, so they do not toggle it on and off, they simply ignore the replacement.

This only automatically removes an autocorrect for a single backspace starting at the end.

This is a bit of a heuristic. It works well because a suggested autocorrect is rarely if ever 1 character long.

Existing problems that this does not fix:

  • Deleting any portion of an autocomplete from the middle
    (Slack handles this by changing the text but removing the autocomplete attributes)

@rnystrom rnystrom merged commit a5ed071 into master Feb 17, 2018
@BasThomas BasThomas deleted the bugfix/autocorrect branch February 17, 2018 14:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants