diff --git a/docs/_includes/js/modal.html b/docs/_includes/js/modal.html index 993b72103d..e2ed1918e1 100644 --- a/docs/_includes/js/modal.html +++ b/docs/_includes/js/modal.html @@ -15,7 +15,12 @@

There are some caveats regarding using modals on mobile devices. See our browser support docs for details.

-

Due to how HTML5 defines its semantics, the autofocus HTML attribute has no effect in Bootstrap modals.

+

Due to how HTML5 defines its semantics, the autofocus HTML attribute has no effect in Bootstrap modals. To achieve the same effect, use some custom JavaScript:

+ {% highlight js %} + $('#myModal').on('shown.bs.modal', function () { + $('#myInput').focus() + }) + {% endhighlight %}

Examples