summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZuul <zuul@review.opendev.org>2023-05-09 20:12:25 +0000
committerGerrit Code Review <review@openstack.org>2023-05-09 20:12:25 +0000
commit3be3878be33f46f55deaa1c29305aefab5001c80 (patch)
tree48431e5fb6ca766460818083328b8486bd1f6da2
parenta80ffceac45f92c4d41de8c84f76fae7565e13b9 (diff)
parenteafd2f41b77048e51007dc4d5f2a6ebe790fa7b9 (diff)
downloadhorizon-3be3878be33f46f55deaa1c29305aefab5001c80.tar.gz
Merge "Fix deprecated use of 'jQuery.fn.focus()' shorthand event"
-rw-r--r--horizon/static/horizon/js/horizon.modals.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/horizon/static/horizon/js/horizon.modals.js b/horizon/static/horizon/js/horizon.modals.js
index 629023905..8ff9f3ab8 100644
--- a/horizon/static/horizon/js/horizon.modals.js
+++ b/horizon/static/horizon/js/horizon.modals.js
@@ -169,7 +169,7 @@ horizon.modals.init_wizard = function () {
});
// Focus the first invalid field.
if (first_field) {
- $field.focus();
+ $field.trigger('focus');
first_field = false;
}
});
@@ -428,7 +428,7 @@ horizon.addInitFunction(horizon.modals.init = function() {
// Focus the first usable form field in the modal for accessibility.
horizon.modals.addModalInitFunction(function (modal) {
- $(modal).find(":text, select, textarea").filter(":visible:first").focus();
+ $(modal).find(":text, select, textarea").filter(":visible:first").trigger("focus");
});
horizon.modals.addModalInitFunction(function(modal) {