mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-07-31 12:30:11 +02: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:
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 Hotkeys from '../utils/hotkeys'
|
||||||
import {
|
import {
|
||||||
HAS_BEFORE_INPUT_SUPPORT,
|
HAS_BEFORE_INPUT_SUPPORT,
|
||||||
|
IS_IOS,
|
||||||
IS_CHROME,
|
IS_CHROME,
|
||||||
IS_FIREFOX,
|
IS_FIREFOX,
|
||||||
IS_FIREFOX_LEGACY,
|
IS_FIREFOX_LEGACY,
|
||||||
@@ -659,7 +660,7 @@ export const Editable = (props: EditableProps) => {
|
|||||||
// aren't correct and never fire the "insertFromComposition"
|
// aren't correct and never fire the "insertFromComposition"
|
||||||
// type that we need. So instead, insert whenever a composition
|
// type that we need. So instead, insert whenever a composition
|
||||||
// ends since it will already have been committed to the DOM.
|
// 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)
|
Editor.insertText(editor, event.data)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user