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

Remove is native #1088

Merged
merged 5 commits into from
Sep 10, 2017
Merged

Remove is native #1088

merged 5 commits into from
Sep 10, 2017

Conversation

ianstormtaylor
Copy link
Owner

@ianstormtaylor ianstormtaylor commented Sep 8, 2017

Thanks to @conorcussell for kicking this off in #964!

If anyone can test this branch to double-check my work, that would be super appreciated!

This removes the isNative flag from Slate, with seemingly zero performance reprecutions! 🎉 Instead of spending a significant amount of time calculating things in onBeforeInput, it now spends an equivalent-ish amount of time in render and updateSelection. Previously these two were being skipped for "native" updates.

As far as I can tell the performance benefits from isNative are negligible with all of the other performance handling logic we have (memoizing method, shouldComponentUpdate shortcuts, etc.) so we can remove it. Which seems nice, because it is a cause for lots of headaches UX-wise.

I won't merge this for a little bit, because I want to give the recent 0.22 a chance to settle and for plugins to get updated first before doing another breaking change. (Even though it is way less breaking.)

Fixes #963

@YurkaninRyan
Copy link
Collaborator

Looked over it and nothing is glaring, this is going to do amazing things for the complexity of this part of the codebase though 🥂

@ianstormtaylor ianstormtaylor merged commit 10e4216 into master Sep 10, 2017
@ianstormtaylor ianstormtaylor deleted the remove-is-native branch September 21, 2017 19:01
rgrove added a commit to rgrove/slate that referenced this pull request Oct 4, 2017
Preventing native text input events completely breaks autocorrect,
autocomplete, auto-capitalization, predictive text, and double-space
period insertion on iOS. In order to allow iOS to perform these kinds of
operations, we have to avoid preventing the default event behavior
and allow native input handling whenever possible.

Fixes ianstormtaylor#1176
Fixes ianstormtaylor#1177

See also: ianstormtaylor#1088
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants