diff options
author | Louis-Maxime Piton <louismaxime.piton@orange.com> | 2022-05-20 20:21:48 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-20 20:21:48 +0300 |
commit | 8959bf3f0bbaca514967661a6b721a3f065f49a9 (patch) | |
tree | 414bfe693230df5b2004547ba59b921b72a403d4 /site/content/docs/5.2/components/modal.md | |
parent | 73e45ee36cf4fdb6014267ecc67ba53a8b25fdae (diff) |
Docs: quick fixes for HTML (#36395)
* Using the new helper in the doc
* Remove input from `Tab` access
* Change scrollspy code examples
* Reordering tables for JS
* Fix for parcel file
* Center align all the code example texts in layout
* Alphabetical reorder the helpers
Diffstat (limited to 'site/content/docs/5.2/components/modal.md')
-rw-r--r-- | site/content/docs/5.2/components/modal.md | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/site/content/docs/5.2/components/modal.md b/site/content/docs/5.2/components/modal.md index 762a569bff..a2354eb855 100644 --- a/site/content/docs/5.2/components/modal.md +++ b/site/content/docs/5.2/components/modal.md @@ -830,8 +830,8 @@ const myModalAlternative = new bootstrap.Modal('#myModal', options) | Name | Type | Default | Description | | --- | --- | --- | --- | | `backdrop` | boolean, `'static'` | `true` | Includes a modal-backdrop element. Alternatively, specify `static` for a backdrop which doesn't close the modal when clicked. | -| `keyboard` | boolean | `true` | Closes the modal when escape key is pressed. | | `focus` | boolean | `true` | Puts the focus on the modal when initialized. | +| `keyboard` | boolean | `true` | Closes the modal when escape key is pressed. | {{< /bs-table >}} ### Methods @@ -853,13 +853,13 @@ const myModal = new bootstrap.Modal('#myModal', { {{< bs-table "table" >}} | Method | Description | | --- | --- | -| `toggle` | Manually toggles a modal. **Returns to the caller before the modal has actually been shown or hidden** (i.e. before the `shown.bs.modal` or `hidden.bs.modal` event occurs). | -| `show` | Manually opens a modal. **Returns to the caller before the modal has actually been shown** (i.e. before the `shown.bs.modal` event occurs). Also, you can pass a DOM element as an argument that can be received in the modal events (as the `relatedTarget` property). (i.e. `const modalToggle = document.getElementById('toggleMyModal'); myModal.show(modalToggle)` | -| `hide` | Manually hides a modal. **Returns to the caller before the modal has actually been hidden** (i.e. before the `hidden.bs.modal` event occurs). | -| `handleUpdate` | Manually readjust the modal's position if the height of a modal changes while it is open (i.e. in case a scrollbar appears). | | `dispose` | Destroys an element's modal. (Removes stored data on the DOM element) | | `getInstance` | *Static* method which allows you to get the modal instance associated with a DOM element. | | `getOrCreateInstance` | *Static* method which allows you to get the modal instance associated with a DOM element, or create a new one in case it wasn't initialized. | +| `handleUpdate` | Manually readjust the modal's position if the height of a modal changes while it is open (i.e. in case a scrollbar appears). | +| `hide` | Manually hides a modal. **Returns to the caller before the modal has actually been hidden** (i.e. before the `hidden.bs.modal` event occurs). | +| `show` | Manually opens a modal. **Returns to the caller before the modal has actually been shown** (i.e. before the `shown.bs.modal` event occurs). Also, you can pass a DOM element as an argument that can be received in the modal events (as the `relatedTarget` property). (i.e. `const modalToggle = document.getElementById('toggleMyModal'); myModal.show(modalToggle)` | +| `toggle` | Manually toggles a modal. **Returns to the caller before the modal has actually been shown or hidden** (i.e. before the `shown.bs.modal` or `hidden.bs.modal` event occurs). | {{< /bs-table >}} ### Events @@ -869,11 +869,11 @@ Bootstrap's modal class exposes a few events for hooking into modal functionalit {{< bs-table >}} | Event | Description | | --- | --- | -| `show.bs.modal` | This event fires immediately when the `show` instance method is called. If caused by a click, the clicked element is available as the `relatedTarget` property of the event. | -| `shown.bs.modal` | This event is fired when the modal has been made visible to the user (will wait for CSS transitions to complete). If caused by a click, the clicked element is available as the `relatedTarget` property of the event. | | `hide.bs.modal` | This event is fired immediately when the `hide` instance method has been called. | | `hidden.bs.modal` | This event is fired when the modal has finished being hidden from the user (will wait for CSS transitions to complete). | | `hidePrevented.bs.modal` | This event is fired when the modal is shown, its backdrop is `static` and a click outside of the modal is performed. The event is also fired when the escape key is pressed and the `keyboard` option is set to `false`. | +| `show.bs.modal` | This event fires immediately when the `show` instance method is called. If caused by a click, the clicked element is available as the `relatedTarget` property of the event. | +| `shown.bs.modal` | This event is fired when the modal has been made visible to the user (will wait for CSS transitions to complete). If caused by a click, the clicked element is available as the `relatedTarget` property of the event. | {{< /bs-table >}} ```js |