Skip to content

Allow "space" to pass through so that auto-correct works on Mobile Safar...#93

Closed
jamienk wants to merge 1 commit into
nytimes:masterfrom
jamienk:patch-1
Closed

Allow "space" to pass through so that auto-correct works on Mobile Safar...#93
jamienk wants to merge 1 commit into
nytimes:masterfrom
jamienk:patch-1

Conversation

@jamienk

@jamienk jamienk commented Dec 10, 2013

Copy link
Copy Markdown

...i

if no range is selected -- and hence we are not "overwriting" a selection -- then we should allow the "space" to pass through as default rather than inserting '\u00A0'. Allowing the space to be treated default makes auto-correct continue to work on (at least) iPhones, where the "space" event is what triggers auto-correct, auto-complete, auto-capitalization, 2 spaces marking the end of a sentence, etc. Otherwise, auto-correct breaks.

This does create one small problem, where an inserted space, as the first or only character of added text, will not trigger the "tracking" code to be added. Not sure how to handle that...

…fari

if no range is selected -- and hence we are not "overwriting" a selection -- then we should allow the "space" to pass through as default rather than inserting '\u00A0'. Allowing the space to be treated default makes auto-correct continue to work on (at least) iPhones, where the "space" event is what triggers auto-correct, auto-complete, auto-capitalization, 2 spaces marking the end of a sentence, etc. Otherwise, auto-correct breaks.

This does create one small problem, where an inserted space, as the first or only character of added text, will not trigger the "tracking" code to be added. Not sure how to handle that...
@jamienk

jamienk commented Dec 15, 2013

Copy link
Copy Markdown
Author

What does anyone think of this? :)

@delambo

delambo commented Dec 15, 2013

Copy link
Copy Markdown
Contributor

Hi @jamienk. I think you need to update your pull - I fixed some whitespace around that code. I'll have to test this functionality out. We need to make sure that multiple spaces can be entered in succession and show in the editor. I think there were other problems with multiple spaces not showing at the end of the editor, as well (I'll have to look that up).

@jamienk

jamienk commented Dec 16, 2013

Copy link
Copy Markdown
Author

#96 I'm not familiar with updating the pull req beyond just redoing it? Let me know if this is helpful at all. I guess I should learn better how to Github

@delambo

delambo commented Dec 16, 2013

Copy link
Copy Markdown
Contributor

It's cool. I'll take a look soon. Thanks.

@delambo delambo closed this Dec 16, 2013
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 this pull request may close these issues.

2 participants