diff --git a/RELEASE-NOTES.md b/RELEASE-NOTES.md index 3e4a2c76e..792f26872 100644 --- a/RELEASE-NOTES.md +++ b/RELEASE-NOTES.md @@ -6,6 +6,7 @@ - **Form Validation** - Bracketed notation can now be omitted for rules, instead passing in bracketed values with the `value` parameter #3313 - **Dropdown** - Using `search selection` with `selectOnKeydown` will now highlight the partial search matching the currently keyboard selected value - **Modal** - Modal now includes setting to enable/disable keyboard shortcuts +- **Modal** - Modal will now focus first tabable element, not just `input` #4370 **Bugs** - **NPM** - Fixed `package.json` to allow either jQuery `2.x` or `3.x` #4254 diff --git a/src/definitions/modules/modal.js b/src/definitions/modules/modal.js index 5a9f7d03c..b8c32f5a6 100644 --- a/src/definitions/modules/modal.js +++ b/src/definitions/modules/modal.js @@ -579,7 +579,7 @@ $.fn.modal = function(parameters) { set: { autofocus: function() { var - $inputs = $module.find(':input').filter(':visible'), + $inputs = $module.find('[tabindex], :input').filter(':visible'), $autofocus = $inputs.filter('[autofocus]'), $input = ($autofocus.length > 0) ? $autofocus.first()