mirror of
https://github.com/tenrok/bootstrap.git
synced 2026-06-08 17:22:31 +03:00
Backport #29251
allow to pass popper.js configuration for tooltip/popover and dropdown
This commit is contained in:
@@ -1266,4 +1266,21 @@ $(function () {
|
||||
|
||||
assert.strictEqual(tooltip.config.sanitize, true)
|
||||
})
|
||||
|
||||
QUnit.test('should allow to pass config to popper.js with `popperConfig`', function (assert) {
|
||||
assert.expect(1)
|
||||
|
||||
var $trigger = $('<a href="#" rel="tooltip" data-trigger="click" title="Another tooltip"/>')
|
||||
.appendTo('#qunit-fixture')
|
||||
.bootstrapTooltip({
|
||||
popperConfig: {
|
||||
placement: 'left'
|
||||
}
|
||||
})
|
||||
|
||||
var tooltip = $trigger.data('bs.tooltip')
|
||||
var popperConfig = tooltip._getPopperConfig('top')
|
||||
|
||||
assert.strictEqual(popperConfig.placement, 'left')
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user