From 4053aa49eb6baaf730174dc27ff1de4b916fb453 Mon Sep 17 00:00:00 2001 From: manchandavishal Date: Thu, 13 Apr 2023 00:49:30 +0530 Subject: 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 --- horizon/static/horizon/js/horizon.membership.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- cgit v1.2.1