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
This commit is contained in:
manchandavishal 2023-04-13 01:31:53 +05:30
parent 7d44796eca
commit f51d5e513c
1 changed files with 1 additions and 1 deletions

View File

@ -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();