1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-08-29 16:19:53 +02:00
Be consistent with Popper's name.
This commit is contained in:
XhmikosR
2020-11-21 21:51:49 +02:00
parent 631b5d4df1
commit 57e045f0ab
11 changed files with 45 additions and 45 deletions

View File

@@ -143,14 +143,14 @@ class Dropdown {
return
}
// Disable totally Popper.js for Dropdown in Navbar
// Totally disable Popper for Dropdowns in Navbar
if (!this._inNavbar && usePopper) {
/**
* Check for Popper dependency
* Popper - https://popper.js.org
*/
if (typeof Popper === 'undefined') {
throw new TypeError('Bootstrap\'s dropdowns require Popper.js (https://popper.js.org/)')
throw new TypeError('Bootstrap\'s dropdowns require Popper (https://popper.js.org)')
}
let referenceElement = this._element
@@ -334,7 +334,7 @@ class Dropdown {
}
}
// Disable Popper.js if we have a static display
// Disable Popper if we have a static display
if (this._config.display === 'static') {
popperConfig.modifiers.applyStyle = {
enabled: false

View File

@@ -114,7 +114,7 @@ const TRIGGER_MANUAL = 'manual'
class Tooltip {
constructor(element, config) {
if (typeof Popper === 'undefined') {
throw new TypeError('Bootstrap\'s tooltips require Popper.js (https://popper.js.org/)')
throw new TypeError('Bootstrap\'s tooltips require Popper (https://popper.js.org)')
}
// private

View File

@@ -747,7 +747,7 @@ $(function () {
$dropdown.trigger('click')
})
QUnit.test('Dropdown should not use Popper.js in navbar', function (assert) {
QUnit.test('Dropdown should not use Popper in navbar', function (assert) {
assert.expect(1)
var done = assert.async()
var html = '<nav class="navbar navbar-expand-md navbar-light bg-light">' +
@@ -770,7 +770,7 @@ $(function () {
$triggerDropdown
.parent('.dropdown')
.on('shown.bs.dropdown', function () {
assert.ok(typeof $dropdownMenu.attr('style') === 'undefined', 'No inline style applied by Popper.js')
assert.ok(typeof $dropdownMenu.attr('style') === 'undefined', 'No inline style applied by Popper')
done()
})
$triggerDropdown.trigger($.Event('click'))
@@ -1084,7 +1084,7 @@ $(function () {
done()
})
QUnit.test('should not use Popper.js if display set to static', function (assert) {
QUnit.test('should not use Popper if display set to static', function (assert) {
assert.expect(1)
var dropdownHTML =
'<div class="dropdown">' +
@@ -1106,7 +1106,7 @@ $(function () {
$dropdown.parent('.dropdown')
.on('shown.bs.dropdown', function () {
// Popper.js add this attribute when we use it
// Popper adds this attribute when we use it
assert.strictEqual(dropdownMenu.getAttribute('x-placement'), null)
done()
})
@@ -1114,7 +1114,7 @@ $(function () {
$dropdown.trigger('click')
})
QUnit.test('should call Popper.js and detect navbar on update', function (assert) {
QUnit.test('should call Popper and detect navbar on update', function (assert) {
assert.expect(3)
var dropdownHTML =
@@ -1546,7 +1546,7 @@ $(function () {
assert.ok(typeof offset.fn === 'undefined')
})
QUnit.test('should allow to pass config to popper.js with `popperConfig`', function (assert) {
QUnit.test('should allow to pass config to Popper with `popperConfig`', function (assert) {
assert.expect(1)
var dropdownHTML =

View File

@@ -998,7 +998,7 @@ $(function () {
}, 200)
})
QUnit.test('should call Popper.js to update', function (assert) {
QUnit.test('should call Popper to update', function (assert) {
assert.expect(2)
var $tooltip = $('<a href="#" rel="tooltip" data-trigger="click" title="Another tooltip"/>')
@@ -1014,7 +1014,7 @@ $(function () {
assert.ok(spyPopper.called)
})
QUnit.test('should not call Popper.js to update', function (assert) {
QUnit.test('should not call Popper to update', function (assert) {
assert.expect(1)
var $tooltip = $('<a href="#" rel="tooltip" data-trigger="click" title="Another tooltip"/>')
@@ -1027,7 +1027,7 @@ $(function () {
assert.ok(tooltip._popper === null)
})
QUnit.test('should use Popper.js to get the tip on placement change', function (assert) {
QUnit.test('should use Popper to get the tip on placement change', function (assert) {
assert.expect(1)
var $tooltip = $('<a href="#" rel="tooltip" data-trigger="click" title="Another tooltip"/>')
@@ -1267,7 +1267,7 @@ $(function () {
assert.strictEqual(tooltip.config.sanitize, true)
})
QUnit.test('should allow to pass config to popper.js with `popperConfig`', function (assert) {
QUnit.test('should allow to pass config to Popper with `popperConfig`', function (assert) {
assert.expect(1)
var $trigger = $('<a href="#" rel="tooltip" data-trigger="click" title="Another tooltip"/>')