summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormanchandavishal <manchandavishal143@gmail.com>2023-04-13 01:31:53 +0530
committermanchandavishal <manchandavishal143@gmail.com>2023-04-13 01:31:53 +0530
commitf51d5e513ce928f17b28996014d20ec2af5bbc68 (patch)
tree4da0eff27da882da6bc7a13c87ea0c782d9315b2
parent7d44796eca10fa61d4d98ab98358c5932746734e (diff)
downloadhorizon-f51d5e513ce928f17b28996014d20ec2af5bbc68.tar.gz
Fix deprecation warning for jQuery.fn.keyup() event shorthand
This patch updates the code to use the .on() method instead of the deprecated .keyup() event shorthand, which was causing a deprecation warning. For more info. please refer[1]. [1] https://api.jquery.com/keyup/ Change-Id: Idda3c2f083e6f484dcc745d07ed2d46698b0718d
-rw-r--r--horizon/static/horizon/js/horizon.modals.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/horizon/static/horizon/js/horizon.modals.js b/horizon/static/horizon/js/horizon.modals.js
index b31a9bbf9..e6ade213d 100644
--- a/horizon/static/horizon/js/horizon.modals.js
+++ b/horizon/static/horizon/js/horizon.modals.js
@@ -417,7 +417,7 @@ horizon.addInitFunction(horizon.modals.init = function() {
// Position modal so it's in-view even when scrolled down.
$document.on('show.bs.modal', '.modal', function (evt) {
// avoid closing the modal when escape is pressed on a select input
- $("select", evt.target).keyup(function (e) {
+ $("select", evt.target).on('keyup', function (e) {
if (e.keyCode === 27) {
// remove the focus on the select, so double escape close the modal
e.target.blur();