summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormanchandavishal <manchandavishal143@gmail.com>2023-04-13 00:49:30 +0530
committermanchandavishal <manchandavishal143@gmail.com>2023-04-13 00:49:30 +0530
commit4053aa49eb6baaf730174dc27ff1de4b916fb453 (patch)
treea5f5931a92b2cfee2fc5b058203d64279c21fc82
parent7d44796eca10fa61d4d98ab98358c5932746734e (diff)
downloadhorizon-4053aa49eb6baaf730174dc27ff1de4b916fb453.tar.gz
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
-rw-r--r--horizon/static/horizon/js/horizon.membership.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/horizon/static/horizon/js/horizon.membership.js b/horizon/static/horizon/js/horizon.membership.js
index 7d453c556..7ff62c4e3 100644
--- a/horizon/static/horizon/js/horizon.membership.js
+++ b/horizon/static/horizon/js/horizon.membership.js
@@ -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;