diff --git a/server/serverpl/filebrowser/static/filebrowser/explorer/explorer.component.html b/server/serverpl/filebrowser/static/filebrowser/explorer/explorer.component.html index 70f040a244..e9c98a6d87 100755 --- a/server/serverpl/filebrowser/static/filebrowser/explorer/explorer.component.html +++ b/server/serverpl/filebrowser/static/filebrowser/explorer/explorer.component.html @@ -7,6 +7,7 @@ type='text' placeholder='Press enter to create esc to cancel...' auto-focus='true' ng-model='resource.name' + ng-blur='explorer.endEditing(resource, $event)' ng-keydown='explorer.endEditing(resource, $event)'/> diff --git a/server/serverpl/filebrowser/static/filebrowser/explorer/explorer.component.js b/server/serverpl/filebrowser/static/filebrowser/explorer/explorer.component.js index fa75b41bc5..42d0114dd9 100755 --- a/server/serverpl/filebrowser/static/filebrowser/explorer/explorer.component.js +++ b/server/serverpl/filebrowser/static/filebrowser/explorer/explorer.component.js @@ -32,7 +32,7 @@ function ExplorerComponent(EditorService, MonacoService, $scope) { EditorService.logError(error); }); } - else if (e.keyCode === 27) { // esc + else if (e.keyCode === 27 || e.type === 'blur') { // esc EditorService.cancelEdition(resource); } };