Skip to content
GitLab
Explore
Projects
Groups
Snippets
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Bootstrap
bootstrap
Commits
9740d8bb
Commit
9740d8bb
authored
10 years ago
by
Phil Hughes
Committed by
Heinrich Fenkart
10 years ago
Browse files
Options
Download
Email Patches
Plain Diff
Fix tooltip occasionally not hiding when using a hide delay
Fixes
#14375
. Closes #14519 by merging it.
parent
783eced7
4 merge requests
!28721
Hot test
,
!16605
Test pull please ignore
,
!22103
test
,
!25326
Adjust examples
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
js/tests/unit/tooltip.js
+30
-0
js/tests/unit/tooltip.js
js/tooltip.js
+3
-0
js/tooltip.js
with
33 additions
and
0 deletions
+33
-0
js/tests/unit/tooltip.js
+
30
-
0
View file @
9740d8bb
...
...
@@ -928,6 +928,36 @@ $(function () {
$tooltip
.
trigger
(
'
mouseenter
'
)
})
test
(
'
should hide tip after hide delay even if moused left before end of fade in
'
,
function
()
{
stop
()
var
$tooltip
=
$
(
'
<a href="#" rel="tooltip" title="Another tooltip for test"/>
'
)
.
appendTo
(
'
#qunit-fixture
'
)
.
bootstrapTooltip
({
delay
:
{
show
:
10
,
hide
:
10
}})
setTimeout
(
function
()
{
ok
(
!
$tooltip
.
data
(
'
bs.tooltip
'
).
$tip
,
'
1ms: tooltip exists
'
)
setTimeout
(
function
()
{
ok
(
$tooltip
.
data
(
'
bs.tooltip
'
).
$tip
.
is
(
'
.fade.in
'
),
'
10ms: tooltip faded in
'
)
},
10
)
setTimeout
(
function
()
{
ok
(
$tooltip
.
data
(
'
bs.tooltip
'
).
$tip
.
is
(
'
.fade.in
'
),
'
15ms: tooltip faded in
'
)
$tooltip
.
trigger
(
'
mouseout
'
)
},
15
)
setTimeout
(
function
()
{
ok
(
!
$tooltip
.
data
(
'
bs.tooltip
'
).
$tip
.
is
(
'
.fade.in
'
),
'
30ms: tooltip faded out
'
)
start
()
},
30
)
},
0
)
$tooltip
.
trigger
(
'
mouseenter
'
)
})
test
(
'
should correctly position tooltips on SVG elements
'
,
function
()
{
if
(
!
window
.
SVGElement
)
{
// Skip IE8 since it doesn't support SVG
...
...
This diff is collapsed.
Click to expand it.
js/tooltip.js
+
3
-
0
View file @
9740d8bb
...
...
@@ -207,8 +207,11 @@
this
.
applyPlacement
(
calculatedOffset
,
placement
)
var
complete
=
function
()
{
var
prevHoverState
=
that
.
hoverState
that
.
$element
.
trigger
(
'
shown.bs.
'
+
that
.
type
)
that
.
hoverState
=
null
if
(
prevHoverState
==
'
out
'
)
that
.
leave
(
that
)
}
$
.
support
.
transition
&&
this
.
$tip
.
hasClass
(
'
fade
'
)
?
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Snippets