diff options
Diffstat (limited to 'horizon/static/horizon/js/horizon.modals.js')
-rw-r--r-- | horizon/static/horizon/js/horizon.modals.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/horizon/static/horizon/js/horizon.modals.js b/horizon/static/horizon/js/horizon.modals.js index 87e546ca2..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; } }); @@ -349,7 +349,7 @@ horizon.addInitFunction(horizon.modals.init = function() { json_data = JSON.parse(data); field_to_update = $("#" + add_to_field_header); field_to_update.append("<option value='" + json_data[0] + "'>" + json_data[1] + "</option>"); - field_to_update.change(); + field_to_update.trigger("change"); field_to_update.val(json_data[0]); } else { horizon.modals.success(data, textStatus, jqXHR); @@ -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) { |