mirror of
https://github.com/facebook/react.git
synced 2026-11-18 20:15:56 +00:00
1 parent
cd9046f815
commit
65c137768a
2 files changed
+2
-2
No files matched your search
+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