0
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-02-20 17:54:23 +01:00

Merge branch 'v4-dev' of https://github.com/twbs/bootstrap into v4-dev

This commit is contained in:
Mark Otto 2017-07-04 11:53:55 -07:00
commit a662f85398
12 changed files with 48 additions and 21 deletions

View File

@ -53,5 +53,5 @@ cdn:
js_hash: "sha384-vBWWzlZJ8ea9aCX4pEW3rVHjgjt7zpkNpZk+02D9phzyeVkE+jo0ieGizqPLForn"
jquery: https://code.jquery.com/jquery-3.2.1.slim.min.js
jquery_hash: "sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN"
popper: https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.10.1/umd/popper.min.js
popper_hash: "sha256-nxD3NU7Wocq19nG7DTQAx9troUwVoxjUhYrAhFSO3HM="
popper: https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.10.8/umd/popper.min.js
popper_hash: "sha256-n96swYoYKdVyLr5XatK9CzcdyrpAI0xcSlIeWOZeTAI="

File diff suppressed because one or more lines are too long

View File

@ -32,6 +32,6 @@
],
"dependencies": {
"jquery": ">=1.9.1",
"popper.js": "^1.10.1"
"popper.js": "^1.10.8"
}
}

View File

@ -3008,8 +3008,8 @@
},
"popper.js": {
"version": "1.10.2",
"from": "popper.js@>=1.10.1 <2.0.0",
"resolved": "https://registry.npmjs.org/popper.js/-/popper.js-1.10.2.tgz"
"from": "popper.js@>=1.10.8 <2.0.0",
"resolved": "https://registry.npmjs.org/popper.js/-/popper.js-1.10.8.tgz"
},
"postcss": {
"version": "6.0.2",

View File

@ -10,7 +10,7 @@ toc: true
Dropdowns are toggleable, contextual overlays for displaying lists of links and more. They're made interactive with the included Bootstrap dropdown JavaScript plugin. They're toggled by clicking, not by hovering; this is [an intentional design decision.](http://markdotto.com/2012/02/27/bootstrap-explained-dropdowns/)
Dropdowns are built on a third party library, [Popper.js](https://popper.js.org), which provides dynamic positioning and viewport detection. Be sure to include [popper.min.js](https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.10.1/umd/popper.min.js) before Bootstrap's JavaScript.
Dropdowns are built on a third party library, [Popper.js](https://popper.js.org), which provides dynamic positioning and viewport detection. Be sure to include [popper.min.js](https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.10.8/umd/popper.min.js) before Bootstrap's JavaScript.
## Accessibility

View File

@ -11,7 +11,7 @@ toc: true
Things to know when using the popover plugin:
- Popovers rely on the 3rd party library [Popper.js](https://popper.js.org) for positioning. You must include [popper.min.js](https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.10.1/umd/popper.min.js) before bootstrap.js in order for popovers to work!
- Popovers rely on the 3rd party library [Popper.js](https://popper.js.org) for positioning. You must include [popper.min.js](https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.10.8/umd/popper.min.js) before bootstrap.js in order for popovers to work!
- Popovers require the [tooltip plugin]({{ site.baseurl }}/docs/{{ site.docs_version }}/components/tooltips/) as a dependency.
- Popovers are opt-in for performance reasons, so **you must initialize them yourself**.
- Zero-length `title` and `content` values will never show a popover.

View File

@ -10,7 +10,7 @@ toc: true
Things to know when using the tooltip plugin:
- Tooltips rely on the 3rd party library [Popper.js](https://popper.js.org) for positioning. You must include [popper.min.js](https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.10.1/umd/popper.min.js) before bootstrap.js in order for tooltips to work!
- Tooltips rely on the 3rd party library [Popper.js](https://popper.js.org) for positioning. You must include [popper.min.js](https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.10.8/umd/popper.min.js) before bootstrap.js in order for tooltips to work!
- Tooltips are opt-in for performance reasons, so **you must initialize them yourself**.
- Tooltips with zero-length titles are never displayed.
- Specify `container: 'body'` to avoid rendering problems in more complex components (like our input groups, button groups, etc).

View File

@ -1,7 +1,7 @@
---
layout: docs
title: Vertical alignment
description: Easily change the vertical alignment of inlie, inline-block, inline-table, and table cell elements.
description: Easily change the vertical alignment of inline, inline-block, inline-table, and table cell elements.
group: utilities
---

View File

@ -265,14 +265,10 @@ const Dropdown = (($) => {
}
}
// Disable Popper.js for Dropdown in Navbar
if (this._inNavbar) {
popperConfig.modifiers.AfterApplyStyle = {
enabled: true,
order: 901, // ApplyStyle order + 1
fn: () => {
// reset Popper styles
$(this._menu).attr('style', '')
}
popperConfig.modifiers.applyStyle = {
enabled: !this._inNavbar
}
}
return popperConfig

View File

@ -620,4 +620,33 @@ $(function () {
})
$dropdown.trigger('click')
})
QUnit.test('Dropdown should not use Popper.js in navbar', function (assert) {
assert.expect(1)
var done = assert.async()
var html = '<nav class="navbar navbar-expand-md navbar-light bg-light">'
+ '<div class="dropdown">'
+ ' <a class="nav-link dropdown-toggle" href="#" id="dropdown" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Dropdown</a>'
+ ' <div class="dropdown-menu" aria-labelledby="dropdown">'
+ ' <a class="dropdown-item" href="#">Action</a>'
+ ' <a class="dropdown-item" href="#">Another action</a>'
+ ' <a class="dropdown-item" href="#">Something else here</a>'
+ ' </div>'
+ '</div>'
+ '</nav>'
$(html).appendTo('#qunit-fixture')
var $triggerDropdown = $('#qunit-fixture')
.find('[data-toggle="dropdown"]')
.bootstrapDropdown()
var $dropdownMenu = $triggerDropdown.next()
$triggerDropdown
.parent('.dropdown')
.on('shown.bs.dropdown', function () {
assert.ok($dropdownMenu.attr('style') === undefined, 'No inline style applied by Popper.js')
done()
})
$triggerDropdown.trigger($.Event('click'))
})
})

View File

@ -68,7 +68,7 @@
"license": "MIT",
"dependencies": {
"jquery": ">=1.9.1",
"popper.js": "^1.10.1"
"popper.js": "^1.10.8"
},
"devDependencies": {
"autoprefixer": "^7.1.1",

View File

@ -40,7 +40,7 @@
@include text-emphasis-variant('.text-#{$color}', $value);
}
.text-muted { color: $gray-400 !important; }
.text-muted { color: $text-muted !important; }
// Misc