mirror of
https://github.com/tenrok/bootstrap.git
synced 2026-06-05 16:42:29 +03:00
This reverts commit 5c6925385e.
This commit is contained in:
@@ -632,9 +632,9 @@ Add `.disabled` to items in the dropdown to **style them as disabled**.
|
||||
|
||||
By default, a dropdown menu is automatically positioned 100% from the top and along the left side of its parent. Add `.dropdown-menu-right` to a `.dropdown-menu` to right align the dropdown menu.
|
||||
|
||||
{{% callout info %}}
|
||||
{{< callout info >}}
|
||||
**Heads up!** Dropdowns are positioned thanks to Popper.js (except when they are contained in a navbar).
|
||||
{{% /callout %}}
|
||||
{{< /callout >}}
|
||||
|
||||
{{< example >}}
|
||||
<div class="btn-group">
|
||||
@@ -817,9 +817,9 @@ Use `data-offset` or `data-reference` to change the location of the dropdown.
|
||||
|
||||
Via data attributes or JavaScript, the dropdown plugin toggles hidden content (dropdown menus) by toggling the `.show` class on the parent list item. The `data-toggle="dropdown"` attribute is relied on for closing dropdown menus at an application level, so it's a good idea to always use it.
|
||||
|
||||
{{% callout info %}}
|
||||
{{< callout info >}}
|
||||
On touch-enabled devices, opening a dropdown adds empty `mouseover` handlers to the immediate children of the `<body>` element. This admittedly ugly hack is necessary to work around a [quirk in iOS' event delegation](https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html), which would otherwise prevent a tap anywhere outside of the dropdown from triggering the code that closes the dropdown. Once the dropdown is closed, these additional empty `mouseover` handlers are removed.
|
||||
{{% /callout %}}
|
||||
{{< /callout >}}
|
||||
|
||||
### Via data attributes
|
||||
|
||||
@@ -847,11 +847,11 @@ var dropdownList = dropdownElementList.map(function (dropdownToggleEl) {
|
||||
})
|
||||
{{< /highlight >}}
|
||||
|
||||
{{% callout info %}}
|
||||
{{< callout info >}}
|
||||
##### `data-toggle="dropdown"` still required
|
||||
|
||||
Regardless of whether you call your dropdown via JavaScript or instead use the data-api, `data-toggle="dropdown"` is always required to be present on the dropdown's trigger element.
|
||||
{{% /callout %}}
|
||||
{{< /callout >}}
|
||||
|
||||
### Options
|
||||
|
||||
|
||||
Reference in New Issue
Block a user