diff options
author | manchandavishal <manchandavishal143@gmail.com> | 2023-04-10 22:21:55 +0530 |
---|---|---|
committer | manchandavishal <manchandavishal143@gmail.com> | 2023-04-19 21:56:16 +0530 |
commit | c397560d0dec8138592c1374beb69b947d47c31d (patch) | |
tree | 50b74330d48fbffd7ae18fab52e5066d954dc167 | |
parent | 7d44796eca10fa61d4d98ab98358c5932746734e (diff) | |
download | horizon-c397560d0dec8138592c1374beb69b947d47c31d.tar.gz |
Fix "jQuery.fn.mousedown() event shorthand is deprecated" warning
This patch replaced the deprecated mousedown() event shorthand
with on('mousedown', ...) as suggested by the jQuery documentation[1].
This change ensures compatibility with the latest version of jQuery
and resolves the deprecation warning.
[1] https://api.jquery.com/mousedown/#mousedown-handler.
Change-Id: I2ccba8236d5831f4c81b3f963b7dc54fb98d95b8
-rw-r--r-- | horizon/static/horizon/js/horizon.forms.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/horizon/static/horizon/js/horizon.forms.js b/horizon/static/horizon/js/horizon.forms.js index 8fff1d0f5..5806ba6e4 100644 --- a/horizon/static/horizon/js/horizon.forms.js +++ b/horizon/static/horizon/js/horizon.forms.js @@ -168,11 +168,11 @@ horizon.forms = { endDate.hide(); }).data('datepicker'); - $("#id_start").mousedown(function(){ + $("#id_start").on("mousedown", function() { endDate.hide(); }); - $("#id_end").mousedown(function(){ + $("#id_end").on("mousedown", function() { startDate.hide(); }); |