We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c742848 commit a3ae31eCopy full SHA for a3ae31e
packages/react-dev-utils/failFast.js
@@ -103,10 +103,18 @@
103
104
window.addEventListener('unhandledrejection', promiseHandler)
105
106
+ let escapeHandler = function(event) {
107
+ const { key, keyCode, which } = event
108
+ if (key === 'Escape' || keyCode === 27 === which === 27) unmount()
109
+ }
110
+
111
+ window.addEventListener('keydown', escapeHandler)
112
113
if (module.hot) {
114
module.hot.dispose(function() {
115
unmount()
116
window.removeEventListener('unhandledrejection', promiseHandler)
117
+ window.removeEventListener('keydown', escapeHandler)
118
})
119
}
120
})()
0 commit comments