diff --git a/packages/react-dom/src/events/BeforeInputEventPlugin.js b/packages/react-dom/src/events/BeforeInputEventPlugin.js index fc5e2ef26c31e..3307a70bdec6c 100644 --- a/packages/react-dom/src/events/BeforeInputEventPlugin.js +++ b/packages/react-dom/src/events/BeforeInputEventPlugin.js @@ -29,10 +29,7 @@ if (ExecutionEnvironment.canUseDOM && 'documentMode' in document) { // directly represent `beforeInput`. The IE `textinput` event is not as // useful, so we don't use it. const canUseTextInputEvent = - ExecutionEnvironment.canUseDOM && - 'TextEvent' in window && - !documentMode && - !isPresto(); + ExecutionEnvironment.canUseDOM && 'TextEvent' in window && !documentMode; // In IE9+, we have access to composition events, but the data supplied // by the native compositionend event may be incorrect. Japanese ideographic @@ -42,20 +39,6 @@ const useFallbackCompositionData = (!canUseCompositionEvent || (documentMode && documentMode > 8 && documentMode <= 11)); -/** - * Opera <= 12 includes TextEvent in window, but does not fire - * text input events. Rely on keypress instead. - */ -function isPresto() { - const opera = window.opera; - return ( - opera !== null && - typeof opera === 'object' && - typeof opera.version === 'function' && - parseInt(opera.version(), 10) <= 12 - ); -} - const SPACEBAR_CODE = 32; const SPACEBAR_CHAR = String.fromCharCode(SPACEBAR_CODE);