diff --git a/frontend/src/components/dialog/lib-decrypt-dialog.js b/frontend/src/components/dialog/lib-decrypt-dialog.js
index edd7482ace2..fd011396177 100644
--- a/frontend/src/components/dialog/lib-decrypt-dialog.js
+++ b/frontend/src/components/dialog/lib-decrypt-dialog.js
@@ -35,7 +35,7 @@ class LibDecryptDialog extends React.Component {
e.preventDefault();
};
- handleKeyPress = (e) => {
+ handleKeyDown = (e) => {
if (e.key == 'Enter') {
this.handleSubmit(e);
}
@@ -63,7 +63,7 @@ class LibDecryptDialog extends React.Component {
{this.state.showError &&
{gettext('Wrong password')}
}
-
+
{'* '}{gettext('The password will be kept in the server for only 1 hour.')}
diff --git a/frontend/src/components/dialog/lib-history-setting-dialog.js b/frontend/src/components/dialog/lib-history-setting-dialog.js
index d16b56547fe..2361a503716 100644
--- a/frontend/src/components/dialog/lib-history-setting-dialog.js
+++ b/frontend/src/components/dialog/lib-history-setting-dialog.js
@@ -68,7 +68,7 @@ class LibHistorySetting extends React.Component {
}
};
- handleKeyPress = (e) => {
+ handleKeyDown = (e) => {
if (e.key === 'Enter') {
this.submit();
e.preventDefault();
@@ -139,7 +139,7 @@ class LibHistorySetting extends React.Component {
value={this.state.expireDays}
onChange={this.onChange}
disabled={this.state.disabled}
- onKeyDown={this.handleKeyPress}
+ onKeyDown={this.handleKeyDown}
/>{' '}
diff --git a/frontend/src/components/dialog/lib-old-files-auto-del-dialog.js b/frontend/src/components/dialog/lib-old-files-auto-del-dialog.js
index 72923f5b96d..3ba5c939375 100644
--- a/frontend/src/components/dialog/lib-old-files-auto-del-dialog.js
+++ b/frontend/src/components/dialog/lib-old-files-auto-del-dialog.js
@@ -65,7 +65,7 @@ class LibOldFilesAutoDelDialog extends React.Component {
});
};
- handleKeyPress = (e) => {
+ handleKeyDown = (e) => {
if (e.key === 'Enter') {
this.submit();
e.preventDefault();
@@ -112,7 +112,7 @@ class LibOldFilesAutoDelDialog extends React.Component {
value={this.state.autoDelDays}
disabled={!this.state.isAutoDel}
onChange={this.onChange}
- onKeyDown={this.handleKeyPress}
+ onKeyDown={this.handleKeyDown}
/>{' '}
diff --git a/frontend/src/components/dialog/new-wiki-dialog.js b/frontend/src/components/dialog/new-wiki-dialog.js
index 1f8d251b587..d8fb4313947 100644
--- a/frontend/src/components/dialog/new-wiki-dialog.js
+++ b/frontend/src/components/dialog/new-wiki-dialog.js
@@ -32,7 +32,7 @@ class NewWikiDialog extends React.Component {
});
};
- handleKeyPress = (e) => {
+ handleKeyDown = (e) => {
if (e.key === 'Enter') {
this.handleSubmit();
}
@@ -54,7 +54,7 @@ class NewWikiDialog extends React.Component {
{gettext('New Wiki')}
-
+
diff --git a/frontend/src/components/dialog/org-add-department-dialog.js b/frontend/src/components/dialog/org-add-department-dialog.js
index 751e9b3f728..93d0ea8ee64 100644
--- a/frontend/src/components/dialog/org-add-department-dialog.js
+++ b/frontend/src/components/dialog/org-add-department-dialog.js
@@ -55,7 +55,7 @@ class AddDepartDialog extends React.Component {
});
};
- handleKeyPress = (e) => {
+ handleKeyDown = (e) => {
if (e.key === 'Enter') {
this.handleSubmit();
e.preventDefault();
@@ -73,7 +73,7 @@ class AddDepartDialog extends React.Component {
{
+ handleKeyDown = (e) => {
if (e.key === 'Enter') {
this.handleSubmit();
e.preventDefault();
@@ -68,7 +68,7 @@ class AddRepoDialog extends React.Component {
{
- e.preventDefault();
- if (e.key == 'Enter') {
- this.handleSubmit(e);
- }
- };
-
togglePasswordVisible = () => {
this.setState({isPasswordVisible: !this.state.isPasswordVisible}, () => {
if (this.state.isPasswordVisible) {
diff --git a/frontend/src/components/dialog/org-rename-department-dialog.js b/frontend/src/components/dialog/org-rename-department-dialog.js
index 64322ca0b6a..6de29d5aa32 100644
--- a/frontend/src/components/dialog/org-rename-department-dialog.js
+++ b/frontend/src/components/dialog/org-rename-department-dialog.js
@@ -63,7 +63,7 @@ class RenameDepartmentDialog extends React.Component {
});
};
- handleKeyPress = (e) => {
+ handleKeyDown = (e) => {
if (e.key === 'Enter') {
this.handleSubmit();
e.preventDefault();
@@ -87,7 +87,7 @@ class RenameDepartmentDialog extends React.Component {
{
+ handleKeyDown = (e) => {
if (e.key === 'Enter') {
this.setGroupQuota();
e.preventDefault();
@@ -60,7 +60,7 @@ class SetGroupQuotaDialog extends React.Component {
{
+ handleKeyDown = (e) => {
if (e.key === 'Enter') {
this.handleSubmit();
}
@@ -121,7 +121,7 @@ class Rename extends React.Component {
{type === 'file' ? gettext('Rename File') : gettext('Rename Folder') }
{type === 'file' ? gettext('New file name'): gettext('New folder name')}
-
+
{this.state.errMessage && {this.state.errMessage}}
diff --git a/frontend/src/components/dialog/rename-dirent.js b/frontend/src/components/dialog/rename-dirent.js
index 61a45cb2982..865994b90b2 100644
--- a/frontend/src/components/dialog/rename-dirent.js
+++ b/frontend/src/components/dialog/rename-dirent.js
@@ -63,7 +63,7 @@ class Rename extends React.Component {
}
};
- handleKeyPress = (e) => {
+ handleKeyDown = (e) => {
if (e.key === 'Enter') {
this.handleSubmit();
}
@@ -123,7 +123,7 @@ class Rename extends React.Component {
{type === 'file' ? gettext('Rename File') : gettext('Rename Folder') }
{type === 'file' ? gettext('New file name'): gettext('New folder name')}
-
+
{this.state.errMessage && {this.state.errMessage}}
diff --git a/frontend/src/components/dialog/sysadmin-dialog/set-quota.js b/frontend/src/components/dialog/sysadmin-dialog/set-quota.js
index cd08cea927d..5be4f0c6ea1 100644
--- a/frontend/src/components/dialog/sysadmin-dialog/set-quota.js
+++ b/frontend/src/components/dialog/sysadmin-dialog/set-quota.js
@@ -30,7 +30,7 @@ class SetQuotaDialog extends React.Component {
});
};
- handleKeyPress = (e) => {
+ handleKeyDown = (e) => {
if (e.key == 'Enter') {
this.handleSubmit();
e.preventDefault();
@@ -55,7 +55,7 @@ class SetQuotaDialog extends React.Component {
type="text"
className="form-control"
value={quota}
- onKeyPress={this.handleKeyPress}
+ onKeyDown={this.handleKeyDown}
onChange={this.handleQuotaChange}
/>
diff --git a/frontend/src/components/dialog/sysadmin-dialog/set-upload-download-rate-limit.js b/frontend/src/components/dialog/sysadmin-dialog/set-upload-download-rate-limit.js
index 22b09a78bd2..88b0ec4a732 100644
--- a/frontend/src/components/dialog/sysadmin-dialog/set-upload-download-rate-limit.js
+++ b/frontend/src/components/dialog/sysadmin-dialog/set-upload-download-rate-limit.js
@@ -31,7 +31,7 @@ class SysAdminSetUploadDownloadRateLimitDialog extends React.Component {
});
};
- handleKeyPress = (e) => {
+ handleKeyDown = (e) => {
if (e.key == 'Enter') {
this.handleSubmit();
e.preventDefault();
@@ -56,7 +56,7 @@ class SysAdminSetUploadDownloadRateLimitDialog extends React.Component {
type="text"
className="form-control"
value={rateLimit}
- onKeyPress={this.handleKeyPress}
+ onKeyDown={this.handleKeyDown}
onChange={this.handleRateLimitChange}
/>
diff --git a/frontend/src/components/dialog/sysadmin-dialog/sysadmin-add-department-dialog.js b/frontend/src/components/dialog/sysadmin-dialog/sysadmin-add-department-dialog.js
index 769000d3d58..b2c843439b5 100644
--- a/frontend/src/components/dialog/sysadmin-dialog/sysadmin-add-department-dialog.js
+++ b/frontend/src/components/dialog/sysadmin-dialog/sysadmin-add-department-dialog.js
@@ -55,7 +55,7 @@ class AddDepartDialog extends React.Component {
});
};
- handleKeyPress = (e) => {
+ handleKeyDown = (e) => {
if (e.key === 'Enter') {
this.handleSubmit();
e.preventDefault();
@@ -73,7 +73,7 @@ class AddDepartDialog extends React.Component {
{
+ handleKeyDown = (e) => {
if (e.key === 'Enter') {
this.handleSubmit();
e.preventDefault();
@@ -68,7 +68,7 @@ class AddRepoDialog extends React.Component {
{
- if (e.key === 'Enter') {
- this.handleSubmit();
- e.preventDefault();
- }
- };
-
render() {
return (
diff --git a/frontend/src/components/dialog/sysadmin-dialog/sysadmin-create-group-dialog.js b/frontend/src/components/dialog/sysadmin-dialog/sysadmin-create-group-dialog.js
index fcf78ff7989..41ca3d2a74f 100644
--- a/frontend/src/components/dialog/sysadmin-dialog/sysadmin-create-group-dialog.js
+++ b/frontend/src/components/dialog/sysadmin-dialog/sysadmin-create-group-dialog.js
@@ -44,7 +44,7 @@ class SysAdminCreateGroupDialog extends React.Component {
});
};
- handleKeyPress = (e) => {
+ handleKeyDown = (e) => {
if (e.key === 'Enter') {
this.handleSubmit();
e.preventDefault();
@@ -65,7 +65,7 @@ class SysAdminCreateGroupDialog extends React.Component {
{
+ handleKeyDown = (e) => {
if (e.key === 'Enter') {
this.handleSubmit();
e.preventDefault();
@@ -63,7 +63,7 @@ class SysAdminCreateRepoDialog extends React.Component {
{
+ handleKeyDown = (e) => {
if (e.key === 'Enter') {
this.submit();
e.preventDefault();
@@ -132,7 +132,7 @@ class SysAdminLibHistorySettingDialog extends React.Component {
value={this.state.expireDays}
onChange={this.onChange}
disabled={this.state.disabled}
- onKeyDown={this.handleKeyPress}
+ onKeyDown={this.handleKeyDown}
/>{' '}
diff --git a/frontend/src/components/dialog/sysadmin-dialog/sysadmin-rename-department-dialog.js b/frontend/src/components/dialog/sysadmin-dialog/sysadmin-rename-department-dialog.js
index ccf21d8c0d8..ef521fcb4b3 100644
--- a/frontend/src/components/dialog/sysadmin-dialog/sysadmin-rename-department-dialog.js
+++ b/frontend/src/components/dialog/sysadmin-dialog/sysadmin-rename-department-dialog.js
@@ -58,7 +58,7 @@ class RenameDepartmentDialog extends React.Component {
});
};
- handleKeyPress = (e) => {
+ handleKeyDown = (e) => {
if (e.key === 'Enter') {
this.handleSubmit();
e.preventDefault();
@@ -82,7 +82,7 @@ class RenameDepartmentDialog extends React.Component {
{
+ handleKeyDown = (e) => {
if (e.key === 'Enter') {
this.setGroupQuota();
e.preventDefault();
@@ -60,7 +60,7 @@ class SetGroupQuotaDialog extends React.Component {
{
+ handleKeyDown = (e) => {
if (e.key == 'Enter') {
this.handleSubmit();
e.preventDefault();
@@ -55,7 +55,7 @@ class SysAdminSetOrgMaxUserNumberDialog extends React.Component {
type="text"
className="form-control"
value={value}
- onKeyPress={this.handleKeyPress}
+ onKeyDown={this.handleKeyDown}
onChange={this.handleInputChange}
/>
diff --git a/frontend/src/components/dialog/sysadmin-dialog/sysadmin-set-org-name-dialog.js b/frontend/src/components/dialog/sysadmin-dialog/sysadmin-set-org-name-dialog.js
index 4a9ad650cd6..ed2c98bb763 100644
--- a/frontend/src/components/dialog/sysadmin-dialog/sysadmin-set-org-name-dialog.js
+++ b/frontend/src/components/dialog/sysadmin-dialog/sysadmin-set-org-name-dialog.js
@@ -31,7 +31,7 @@ class SysAdminSetOrgNameDialog extends React.Component {
});
};
- handleKeyPress = (e) => {
+ handleKeyDown = (e) => {
if (e.key == 'Enter') {
this.handleSubmit();
e.preventDefault();
@@ -54,7 +54,7 @@ class SysAdminSetOrgNameDialog extends React.Component {
diff --git a/frontend/src/components/dialog/sysadmin-dialog/update-user.js b/frontend/src/components/dialog/sysadmin-dialog/update-user.js
index bbabd40b9e8..438da85998d 100644
--- a/frontend/src/components/dialog/sysadmin-dialog/update-user.js
+++ b/frontend/src/components/dialog/sysadmin-dialog/update-user.js
@@ -27,7 +27,7 @@ class UpdateUser extends React.Component {
});
};
- handleKeyPress = (e) => {
+ handleKeyDown = (e) => {
if (e.key == 'Enter') {
this.handleSubmit();
e.preventDefault();
@@ -50,7 +50,7 @@ class UpdateUser extends React.Component {
diff --git a/frontend/src/pages/org-admin/org-groups.js b/frontend/src/pages/org-admin/org-groups.js
index 1c4fa30760c..583a7f87cd1 100644
--- a/frontend/src/pages/org-admin/org-groups.js
+++ b/frontend/src/pages/org-admin/org-groups.js
@@ -24,7 +24,7 @@ class Search extends React.Component {
});
};
- handleKeyPress = (e) => {
+ handleKeyDown = (e) => {
if (e.key == 'Enter') {
e.preventDefault();
this.handleSubmit();
@@ -50,7 +50,7 @@ class Search extends React.Component {
placeholder={this.props.placeholder}
value={this.state.value}
onChange={this.handleInputChange}
- onKeyPress={this.handleKeyPress}
+ onKeyDown={this.handleKeyDown}
autoComplete="off"
/>
diff --git a/frontend/src/pages/org-admin/org-users-users.js b/frontend/src/pages/org-admin/org-users-users.js
index 9f17e1756bf..5aa35138528 100644
--- a/frontend/src/pages/org-admin/org-users-users.js
+++ b/frontend/src/pages/org-admin/org-users-users.js
@@ -29,7 +29,7 @@ class Search extends React.Component {
});
};
- handleKeyPress = (e) => {
+ handleKeyDown = (e) => {
if (e.key == 'Enter') {
e.preventDefault();
this.handleSubmit();
@@ -55,7 +55,7 @@ class Search extends React.Component {
placeholder={this.props.placeholder}
value={this.state.value}
onChange={this.handleInputChange}
- onKeyPress={this.handleKeyPress}
+ onKeyDown={this.handleKeyDown}
autoComplete="off"
/>