-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
Make HAS_BEFORE_INPUT_SUPPORT flag more generic. #4118
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
kamilkazmierczak
referenced
this pull request
Apr 1, 2021
…#4150) * replace IS_FIREFOX with IS_FIREFOX_LEGACY in HAS_BEFORE_INPUT_SUPPORT * fix linting errors * Create afraid-donuts-flow.md * Update environment.ts Co-authored-by: Ian Storm Taylor <ian@ianstormtaylor.com>
4 tasks
williamstein
added a commit
to sagemathinc/cocalc
that referenced
this pull request
Apr 2, 2021
🦋 Changeset detectedLatest commit: 566b49e The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Thanks @kamilkazmierczak! |
Merged
beorn
pushed a commit
to beorn/slate
that referenced
this pull request
Apr 13, 2021
* Change "HAS_BEFORE_INPUT_SUPPORT" flag to more generic. * Fix patterns and styles issues. * Fix lint issues. * Create dirty-rabbits-speak.md * Update dirty-rabbits-speak.md * Update editable.tsx Co-authored-by: Ian Storm Taylor <ian@ianstormtaylor.com>
This was referenced Apr 14, 2021
dylans
added a commit
to dylans/slate
that referenced
this pull request
May 4, 2021
ianstormtaylor#4118 and ianstormtaylor#4150 introduced IS_FIREFOX_LEGACY, but this block of code was not updated to reflect that. This breaks insertion of emoji and unicode characters in slate-react. This change fixes ianstormtaylor#3855.
5 tasks
ianstormtaylor
added a commit
that referenced
this pull request
May 5, 2021
* Update IS_FIREFOX_LEGACY flag to prevent FF crash #4118 and #4150 introduced IS_FIREFOX_LEGACY, but this block of code was not updated to reflect that. This breaks insertion of emoji and unicode characters in slate-react. This change fixes #3855. * Update editable.tsx * Create forty-mails-roll.md * Update editable.tsx Apologies, in my tests I was using yarn patch and didn't need to modify the import statement, hopefully this will pass CI now. Co-authored-by: Ian Storm Taylor <ian@ianstormtaylor.com>
ulion
pushed a commit
to xliulian/slate
that referenced
this pull request
May 22, 2021
* Change "HAS_BEFORE_INPUT_SUPPORT" flag to more generic. * Fix patterns and styles issues. * Fix lint issues. * Create dirty-rabbits-speak.md * Update dirty-rabbits-speak.md * Update editable.tsx Co-authored-by: Ian Storm Taylor <ian@ianstormtaylor.com>
ulion
pushed a commit
to xliulian/slate
that referenced
this pull request
May 28, 2021
* Update IS_FIREFOX_LEGACY flag to prevent FF crash ianstormtaylor#4118 and ianstormtaylor#4150 introduced IS_FIREFOX_LEGACY, but this block of code was not updated to reflect that. This breaks insertion of emoji and unicode characters in slate-react. This change fixes ianstormtaylor#3855. * Update editable.tsx * Create forty-mails-roll.md * Update editable.tsx Apologies, in my tests I was using yarn patch and didn't need to modify the import statement, hopefully this will pass CI now. Co-authored-by: Ian Storm Taylor <ian@ianstormtaylor.com> # Conflicts: # packages/slate-react/src/components/editable.tsx
dylans
added a commit
to dylans/slate
that referenced
this pull request
Sep 13, 2021
* Update IS_FIREFOX_LEGACY flag to prevent FF crash ianstormtaylor#4118 and ianstormtaylor#4150 introduced IS_FIREFOX_LEGACY, but this block of code was not updated to reflect that. This breaks insertion of emoji and unicode characters in slate-react. This change fixes ianstormtaylor#3855. * Update editable.tsx * Create forty-mails-roll.md * Update editable.tsx Apologies, in my tests I was using yarn patch and didn't need to modify the import statement, hopefully this will pass CI now. Co-authored-by: Ian Storm Taylor <ian@ianstormtaylor.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
HAS_BEFORE_INPUT_SUPPORT flag is currently resolved based on type of browser but should be detected for every browser by itself.
Issue
Fixes: #3185, #3800
Context
It's impossible to use slate on IE11 because this flag currently does not include IE11, also it is not proper way of detecting whether feature is enabled in browser or not. I left IS_CHROME_LEGACY because of existing comment saying that feature is available but is not working properly.
Detection mechanism was taken from https://developer.mozilla.org/en-US/docs/Web/API/InputEvent/getTargetRanges#feature_detection
Checks
yarn test
.yarn lint
. (Fix errors withyarn fix
.)yarn start
.)