Removed Presto check (#11921)
Sotiris Kiritsis committed
Jan 4, 2018 at 15:28 UTC
4d37040cbf914c9d3c282e8edd67fa97a3c31178
1 file changed
+1
-18
packages/react-dom/src/events/BeforeInputEventPlugin.js
+1
-18
@@ -29,10 +29,7 @@ if (ExecutionEnvironment.canUseDOM && 'documentMode' in document) {
29
// directly represent `beforeInput`. The IE `textinput` event is not as
30
// useful, so we don't use it.
31
const canUseTextInputEvent =
32
- ExecutionEnvironment.canUseDOM &&
33
- 'TextEvent' in window &&
34
- !documentMode &&
35
- !isPresto();
32
+ ExecutionEnvironment.canUseDOM && 'TextEvent' in window && !documentMode;
33
34
// In IE9+, we have access to composition events, but the data supplied
35
// by the native compositionend event may be incorrect. Japanese ideographic
@@ -42,20 +39,6 @@ const useFallbackCompositionData =
39
(!canUseCompositionEvent ||
40
(documentMode && documentMode > 8 && documentMode <= 11));
41
45
-/**
46
- * Opera <= 12 includes TextEvent in window, but does not fire
47
- * text input events. Rely on keypress instead.
48
- */
49
-function isPresto() {
50
- const opera = window.opera;
51
- return (
52
- opera !== null &&
53
- typeof opera === 'object' &&
54
- typeof opera.version === 'function' &&
55
- parseInt(opera.version(), 10) <= 12
56
- );
57
-}
58
-
42
const SPACEBAR_CODE = 32;
43
const SPACEBAR_CHAR = String.fromCharCode(SPACEBAR_CODE);
44