mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
+1
-1
@@ -33,7 +33,7 @@ function isEventSupported(eventNameSuffix: string): boolean {
|
||||
if (!isSupported) {
|
||||
const element = document.createElement('div');
|
||||
element.setAttribute(eventName, 'return;');
|
||||
isSupported = typeof element[eventName] === 'function';
|
||||
isSupported = typeof (element: any)[eventName] === 'function';
|
||||
}
|
||||
|
||||
return isSupported;
|
||||
|
||||
@@ -62,7 +62,7 @@ function extractEvents(
|
||||
// Firefox creates a keypress event for function keys too. This removes
|
||||
// the unwanted keypress events. Enter is however both printable and
|
||||
// non-printable. One would expect Tab to be as well (but it isn't).
|
||||
if (getEventCharCode(nativeEvent) === 0) {
|
||||
if (getEventCharCode(((nativeEvent: any): KeyboardEvent)) === 0) {
|
||||
return;
|
||||
}
|
||||
/* falls through */
|
||||
|
||||
Reference in New Issue
Block a user