mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-03-21 13:49:44 +01:00
Fix ios chrome ime double input issue. (#4049)
* Fix ios chrome ime double input issue. * add changeset * pretty fix. Co-authored-by: Dylan Schiemann <dylan@dojotoolkit.org> Thanks @ulion!
This commit is contained in:
parent
2614dc3c46
commit
6c84422721
6
.changeset/metal-trees-rest.md
Normal file
6
.changeset/metal-trees-rest.md
Normal file
@ -0,0 +1,6 @@
|
||||
---
|
||||
'slate-react': patch
|
||||
'slate': patch
|
||||
---
|
||||
|
||||
Fix ios chrome ime double input issue.
|
@ -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,
|
||||
@ -659,7 +660,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)
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user