File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -170,6 +170,14 @@ class IDEView extends React.Component {
170170 } else {
171171 this . props . expandConsole ( ) ;
172172 }
173+ } else if ( e . keyCode === 27 ) {
174+ if ( this . props . ide . newFolderModalVisible ) {
175+ this . props . closeNewFolderModal ( ) ;
176+ } else if ( this . props . ide . uploadFileModalVisible ) {
177+ this . props . closeUploadFileModal ( ) ;
178+ } else if ( this . props . ide . modalIsVisible ) {
179+ this . props . closeNewFileModal ( ) ;
180+ }
173181 }
174182 }
175183
@@ -562,6 +570,7 @@ IDEView.propTypes = {
562570 closeProjectOptions : PropTypes . func . isRequired ,
563571 newFolder : PropTypes . func . isRequired ,
564572 closeNewFolderModal : PropTypes . func . isRequired ,
573+ closeNewFileModal : PropTypes . func . isRequired ,
565574 createFolder : PropTypes . func . isRequired ,
566575 closeShareModal : PropTypes . func . isRequired ,
567576 showEditorOptions : PropTypes . func . isRequired ,
You can’t perform that action at this time.
0 commit comments