Browse Source

Fixes focus on modal to include tabindex #4370

pull/4381/head
Jack Lukic 8 years ago
parent
commit
54765808d3
2 changed files with 2 additions and 1 deletions
  1. 1
      RELEASE-NOTES.md
  2. 2
      src/definitions/modules/modal.js

1
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 - **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 - **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 now includes setting to enable/disable keyboard shortcuts
- **Modal** - Modal will now focus first tabable element, not just `input` #4370
**Bugs** **Bugs**
- **NPM** - Fixed `package.json` to allow either jQuery `2.x` or `3.x` #4254 - **NPM** - Fixed `package.json` to allow either jQuery `2.x` or `3.x` #4254

2
src/definitions/modules/modal.js

@ -579,7 +579,7 @@ $.fn.modal = function(parameters) {
set: { set: {
autofocus: function() { autofocus: function() {
var var
$inputs = $module.find(':input').filter(':visible'),
$inputs = $module.find('[tabindex], :input').filter(':visible'),
$autofocus = $inputs.filter('[autofocus]'), $autofocus = $inputs.filter('[autofocus]'),
$input = ($autofocus.length > 0) $input = ($autofocus.length > 0)
? $autofocus.first() ? $autofocus.first()

Loading…
Cancel
Save