1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-08-15 11:44:05 +02:00

onCompositionEnd not need to insert text in firfox (#3202)

This commit is contained in:
Jokcy
2019-12-03 14:49:23 +08:00
committed by Ian Storm Taylor
parent 020bb5fb1c
commit 12d21eac2d

View File

@@ -534,7 +534,7 @@ export const Editable = (
// 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 && event.data) {
if (!IS_SAFARI && !IS_FIREFOX && event.data) {
editor.exec({ type: 'insert_text', text: event.data })
}
}