Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/twbs/bootstrap.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authormfansler <mmfansler@gmail.com>2012-10-16 20:27:43 +0400
committermfansler <mmfansler@gmail.com>2012-10-16 20:27:43 +0400
commite24b46b7f3fb9eab5f34fb6e199d24781204c745 (patch)
treea02670c53f80a49c2dd8f2ad8cc9a975a8ef4742 /js
parentfa778792c5a00577cc2f59f70499b60bda2a8457 (diff)
fixes #5336: reorder focus() call to avoid scrolling
Diffstat (limited to 'js')
-rw-r--r--js/bootstrap-modal.js7
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);