1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-08-16 18:44:01 +02:00

Handle dropup for Dropdown

This commit is contained in:
Johann-S
2017-04-17 14:26:40 +02:00
parent 69de65180f
commit 53ee455bc7
4 changed files with 31 additions and 10 deletions

View File

@@ -456,7 +456,7 @@ $(function () {
assert.expect(1)
var done = assert.async()
var containerHTML = '<div>'
var containerHTML = '<div id="test">'
+ '<p style="margin-top: 200px">'
+ '<a href="#" title="very very very very very very very long tooltip">Hover me</a>'
+ '</p>'
@@ -482,7 +482,12 @@ $(function () {
})
.on('shown.bs.tooltip', function () {
var $tooltip = $($(this).data('bs.tooltip').tip)
assert.ok(Math.round($tooltip.offset().top + $tooltip.outerHeight()) >= Math.round($(this).offset().top))
if (/iPhone|iPad|iPod/.test(navigator.userAgent)) {
assert.ok(Math.round($tooltip.offset().top + $tooltip.outerHeight()) <= Math.round($(this).offset().top))
}
else {
assert.ok(Math.round($tooltip.offset().top + $tooltip.outerHeight()) >= Math.round($(this).offset().top))
}
done()
})
.bootstrapTooltip('show')