aboutsummaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorbilly gates <[email protected]>2012-10-17 21:21:31 -0700
committerbilly gates <[email protected]>2012-10-17 21:21:31 -0700
commit3074737d90f1f8f77e0dde3473f4bbe870a217b8 (patch)
tree8661d074737def25e8194d19ad99e6a4d2bc6a78 /js
parente0a007b9299e6991c78bcb77384e15979d6b7485 (diff)
parente24b46b7f3fb9eab5f34fb6e199d24781204c745 (diff)
downloadbootstrap-3074737d90f1f8f77e0dde3473f4bbe870a217b8.tar.xz
bootstrap-3074737d90f1f8f77e0dde3473f4bbe870a217b8.zip
Merge pull request #5549 from mfansler/2.1.2-wip
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 d53f13a00..d2a4878b3 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);