diff options
author | mfansler <mmfansler@gmail.com> | 2012-10-16 20:27:43 +0400 |
---|---|---|
committer | mfansler <mmfansler@gmail.com> | 2012-10-16 20:27:43 +0400 |
commit | e24b46b7f3fb9eab5f34fb6e199d24781204c745 (patch) | |
tree | a02670c53f80a49c2dd8f2ad8cc9a975a8ef4742 /js/bootstrap-modal.js | |
parent | fa778792c5a00577cc2f59f70499b60bda2a8457 (diff) |
fixes #5336: reorder focus() call to avoid scrolling
Diffstat (limited to 'js/bootstrap-modal.js')
-rw-r--r-- | js/bootstrap-modal.js | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/js/bootstrap-modal.js b/js/bootstrap-modal.js index d53f13a00c..d2a4878b3d 100644 --- a/js/bootstrap-modal.js +++ b/js/bootstrap-modal.js @@ -70,13 +70,12 @@ that.$element .addClass('in') .attr('aria-hidden', false) - .focus() that.enforceFocus() transition ? - that.$element.one($.support.transition.end, function () { that.$element.trigger('shown') }) : - that.$element.trigger('shown') + that.$element.one($.support.transition.end, function () { that.$element.focus().trigger('shown') }) : + that.$element.focus().trigger('shown') }) } @@ -232,4 +231,4 @@ }) }) -}(window.jQuery);
\ No newline at end of file +}(window.jQuery); |