From 54765808d3943d50a54e6d448c502396156b5ca2 Mon Sep 17 00:00:00 2001 From: Jack Lukic Date: Sun, 31 Jul 2016 18:58:42 -0400 Subject: [PATCH] Fixes focus on modal to include tabindex #4370 --- RELEASE-NOTES.md | 1 + src/definitions/modules/modal.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) 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()