Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove deprecated keypress #17344

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -220,9 +220,8 @@
});
//prevent posting form on pressing enter key
searchBox.keypress(function (e) {
var key = e.charCode || e.keyCode || 0;
if (key == 13) {
searchBox.keydown(function (e) {
if (e.key == 'Enter') {
return false;
}
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -452,9 +452,8 @@ function initializeMediaApplication(displayMediaApplication, mediaApplicationUrl
}
});

$('#create-folder-name').keypress(function (e) {
var key = e.which;
if (key == 13) { // the enter key code
$('#create-folder-name').keydown(function (e) {
if (e.key == 'Enter') {
$('#modalFooterOk').click();
return false;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1976,10 +1976,8 @@ function initializeMediaApplication(displayMediaApplication, mediaApplicationUrl
}
}
});
$('#create-folder-name').keypress(function (e) {
var key = e.which;
if (key == 13) {
// the enter key code
$('#create-folder-name').keydown(function (e) {
if (e.key == 'Enter') {
$('#modalFooterOk').click();
return false;
}
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@
var searchBox = $('#search-box');
// On Enter, edit the role if there is a single one
searchBox.keypress(function (event) {
if (event.which == 13) {
searchBox.keydown(function (e) {
if (e.key == 'Enter') {
// Edit the role if there is a single filtered element
var visible = $('.roles > ul > li:visible');
Expand Down