Skip to content

Commit

Permalink
Fix ios chrome ime double input issue.
Browse files Browse the repository at this point in the history
  • Loading branch information
ulion committed Aug 4, 2021
1 parent fed9354 commit aba9997
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/slate-react/src/components/editable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import useChildren from '../hooks/use-children'
import Hotkeys from '../utils/hotkeys'
import {
HAS_BEFORE_INPUT_SUPPORT,
IS_IOS,
IS_CHROME,
IS_FIREFOX,
IS_FIREFOX_LEGACY,
Expand Down Expand Up @@ -654,7 +655,7 @@ export const Editable = (props: EditableProps) => {
// aren't correct and never fire the "insertFromComposition"
// type that we need. So instead, insert whenever a composition
// ends since it will already have been committed to the DOM.
if (!IS_SAFARI && !IS_FIREFOX_LEGACY && event.data) {
if (!IS_SAFARI && !IS_FIREFOX_LEGACY && !IS_IOS && event.data) {
Editor.insertText(editor, event.data)
}
}
Expand Down

0 comments on commit aba9997

Please sign in to comment.