Fix deprecation warning for jQuery.fn.keydown() event shorthand

This patch updates the code to use the .on() method instead of
the deprecated .keydown() event shorthand, which was causing a
deprecation warning. For more info. please refer[1].

[1] https://api.jquery.com/keydown/

Change-Id: I00b7c85f940f4967026e5d397321d4d56f10b1aa
This commit is contained in:
manchandavishal 2023-04-13 00:49:30 +05:30
parent 7d44796eca
commit 4053aa49eb
1 changed files with 1 additions and 1 deletions

View File

@ -490,7 +490,7 @@ horizon.membership = {
}
// prevent filter inputs from submitting form on 'enter'
$form.find('.' + step_slug + '_membership').keydown(function(event){
$form.find('.' + step_slug + '_membership').on('keydown', function(event){
if (event.keyCode === 13) {
event.preventDefault();
return false;