0
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-01-29 21:52:22 +01:00

Update modal.md

Removed a duplicate explanation.
This commit is contained in:
CarloMartini 2017-06-26 18:14:52 +02:00 committed by Mark Otto
parent eeb1ccab9b
commit 0bb9fd2082

View File

@ -15,11 +15,6 @@ Before getting started with Bootstrap's modal component, be sure to read the fol
- Bootstrap only supports one modal window at a time. Nested modals aren't supported as we believe them to be poor user experiences.
- Modals use `position: fixed`, which can sometimes be a bit particular about its rendering. Whenever possible, place your modal HTML in a top-level position to avoid potential interference from other elements. You'll likely run into issues when nesting a `.modal` within another fixed element.
- Once again, due to `position: fixed`, there are some caveats with using modals on mobile devices. [See our browser support docs]({{ site.baseurl }}/docs/{{ site.docs_version }}/getting-started/browsers-devices/#modals-and-dropdowns-on-mobile) for details.
- Lastly, the `autofocus` HTML attribute has no effect in modals. Here's how you can achieve the same effect with custom JavaScript.
Keep reading for demos and usage guidelines.
- Due to how HTML5 defines its semantics, [the `autofocus` HTML attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#attr-autofocus) has no effect in Bootstrap modals. To achieve the same effect, use some custom JavaScript:
{% highlight js %}
@ -28,6 +23,8 @@ $('#myModal').on('shown.bs.modal', function () {
})
{% endhighlight %}
Keep reading for demos and usage guidelines.
## Examples
### Modal components