From 0f13e1c2e7acb17fd17d49ef61ef33edc2285fd8 Mon Sep 17 00:00:00 2001 From: Simmon Li Date: Wed, 12 Feb 2025 12:46:50 -0500 Subject: [PATCH] Docs: clarify `hide.bs.modal` event behavior and add prevention details (#38411) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Julien Déramond --- site/content/docs/5.3/components/modal.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/site/content/docs/5.3/components/modal.md b/site/content/docs/5.3/components/modal.md index 9f42f5aba3..25b7f3a3af 100644 --- a/site/content/docs/5.3/components/modal.md +++ b/site/content/docs/5.3/components/modal.md @@ -856,7 +856,7 @@ Bootstrap's modal class exposes a few events for hooking into modal functionalit {{< bs-table >}} | Event | Description | | --- | --- | -| `hide.bs.modal` | This event is fired immediately when the `hide` instance method has been called. | +| `hide.bs.modal` | This event is fired immediately when the `hide` instance method has been called. Can be prevented by calling `event.preventDefault()`. See [JavaScript events documentation]({{< docsref "/getting-started/javascript#events" >}}) for more details on event prevention. | | `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. |