aboutsummaryrefslogtreecommitdiff
path: root/site/content/docs
diff options
context:
space:
mode:
authorRohit Sharma <[email protected]>2021-02-04 01:21:19 +0530
committerGitHub <[email protected]>2021-02-03 21:51:19 +0200
commit3770b7b9e3fd92b164a58caef05a4d9cd650a86a (patch)
treee77ca96026e5957f68939b95709731ddb4d22c5f /site/content/docs
parent02d103be9155514824f74edf17db92ed407b92f3 (diff)
downloadbootstrap-3770b7b9e3fd92b164a58caef05a4d9cd650a86a.tar.xz
bootstrap-3770b7b9e3fd92b164a58caef05a4d9cd650a86a.zip
Dropdown — Emit events on the `.dropdown-toggle` button (#32625)
* Emit events on the dropdown button Emit the events on `.dropdown-toggle` button and then bubble up * Add migration note for events * Update the docs for events * Add unit test to check the event bubbling Co-authored-by: XhmikosR <[email protected]>
Diffstat (limited to 'site/content/docs')
-rw-r--r--site/content/docs/5.0/components/dropdowns.md3
-rw-r--r--site/content/docs/5.0/migration.md1
2 files changed, 2 insertions, 2 deletions
diff --git a/site/content/docs/5.0/components/dropdowns.md b/site/content/docs/5.0/components/dropdowns.md
index 978217583..4c80e863c 100644
--- a/site/content/docs/5.0/components/dropdowns.md
+++ b/site/content/docs/5.0/components/dropdowns.md
@@ -968,8 +968,7 @@ Note when `boundary` is set to any value other than `'scrollParent'`, the style
### Events
-All dropdown events are fired at the `.dropdown-menu`'s parent element and have a `relatedTarget` property, whose value is the toggling anchor element.
-`hide.bs.dropdown` and `hidden.bs.dropdown` events have a `clickEvent` property (only when the original Event type is `click`) that contains an Event Object for the click event.
+All dropdown events are fired at the toggling element and then bubbled up. So you can also add event listeners on the `.dropdown-menu`'s parent element. `hide.bs.dropdown` and `hidden.bs.dropdown` events have a `clickEvent` property (only when the original Event type is `click`) that contains an Event Object for the click event.
<table class="table">
<thead>
diff --git a/site/content/docs/5.0/migration.md b/site/content/docs/5.0/migration.md
index 850e27ab6..8f71fc218 100644
--- a/site/content/docs/5.0/migration.md
+++ b/site/content/docs/5.0/migration.md
@@ -22,6 +22,7 @@ toc: true
- Restored `offset` option for Dropdown, Popover and Tooltip plugins.
- The default value for the `fallbackPlacements` is changed to `['top', 'right', 'bottom', 'left']` for better placement of popper elements.
+- All the events for the dropdown are now triggered on the dropdown toggle button and then bubbled up to the parent element.
## v5.0.0-beta1