-
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
replace IS_FIREFOX with IS_FIREFOX_LEGACY in HAS_BEFORE_INPUT_SUPPORT #4150
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
🦋 Changeset detectedLatest commit: ad8e557 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 @nivekithan! |
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
…ianstormtaylor#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> # Conflicts: # packages/slate-react/src/utils/environment.ts
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
Firefox did not support
onBeforeInput
event so code usedReact
leakySyntheticEvent
as a fallback. Which leads certain bugs likeBut as of
Firefox/87
onBeforeInput
is supported mdnIssue
beforeinput
events #3185Context
So instead of checking if the browser is firefox we will check if the browser is firefox and version is less than 87. If thats true only then we will fallback to
React SyntheticEvent
Checks
yarn test
.yarn lint
. (Fix errors withyarn fix
.)yarn start
.)