Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
B
bootstrap
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
bootstrap
Commits
eaefed51
Commit
eaefed51
authored
Jul 24, 2013
by
Jacob Thornton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixes #8399 w/ tests
parent
930c75e5
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
52 additions
and
7 deletions
+52
-7
dist/js/bootstrap.js
dist/js/bootstrap.js
+3
-3
dist/js/bootstrap.min.js
dist/js/bootstrap.min.js
+1
-1
js/carousel.js
js/carousel.js
+1
-1
js/tests/unit/tooltip.js
js/tests/unit/tooltip.js
+45
-0
js/tooltip.js
js/tooltip.js
+2
-2
No files found.
dist/js/bootstrap.js
View file @
eaefed51
...
@@ -390,7 +390,7 @@
...
@@ -390,7 +390,7 @@
$next
[
0
].
offsetWidth
// force reflow
$next
[
0
].
offsetWidth
// force reflow
$active
.
addClass
(
direction
)
$active
.
addClass
(
direction
)
$next
.
addClass
(
direction
)
$next
.
addClass
(
direction
)
this
.
$element
.
find
(
'
.item
'
)
$active
.
one
(
$
.
support
.
transition
.
end
,
function
()
{
.
one
(
$
.
support
.
transition
.
end
,
function
()
{
$next
.
removeClass
([
type
,
direction
].
join
(
'
'
)).
addClass
(
'
active
'
)
$next
.
removeClass
([
type
,
direction
].
join
(
'
'
)).
addClass
(
'
active
'
)
$active
.
removeClass
([
'
active
'
,
direction
].
join
(
'
'
))
$active
.
removeClass
([
'
active
'
,
direction
].
join
(
'
'
))
...
@@ -1138,10 +1138,10 @@
...
@@ -1138,10 +1138,10 @@
var
self
=
obj
instanceof
this
.
constructor
?
var
self
=
obj
instanceof
this
.
constructor
?
obj
:
$
(
obj
.
currentTarget
)[
this
.
type
](
options
).
data
(
'
bs.
'
+
this
.
type
)
obj
:
$
(
obj
.
currentTarget
)[
this
.
type
](
options
).
data
(
'
bs.
'
+
this
.
type
)
if
(
!
self
.
options
.
delay
||
!
self
.
options
.
delay
.
show
)
return
self
.
show
()
clearTimeout
(
self
.
timeout
)
clearTimeout
(
self
.
timeout
)
if
(
!
self
.
options
.
delay
||
!
self
.
options
.
delay
.
show
)
return
self
.
show
()
self
.
hoverState
=
'
in
'
self
.
hoverState
=
'
in
'
self
.
timeout
=
setTimeout
(
function
()
{
self
.
timeout
=
setTimeout
(
function
()
{
if
(
self
.
hoverState
==
'
in
'
)
self
.
show
()
if
(
self
.
hoverState
==
'
in
'
)
self
.
show
()
...
...
dist/js/bootstrap.min.js
View file @
eaefed51
This diff is collapsed.
Click to expand it.
js/carousel.js
View file @
eaefed51
...
@@ -130,7 +130,7 @@
...
@@ -130,7 +130,7 @@
$next
[
0
].
offsetWidth
// force reflow
$next
[
0
].
offsetWidth
// force reflow
$active
.
addClass
(
direction
)
$active
.
addClass
(
direction
)
$next
.
addClass
(
direction
)
$next
.
addClass
(
direction
)
this
.
$element
.
find
(
'
.item
'
)
$active
.
one
(
$
.
support
.
transition
.
end
,
function
()
{
.
one
(
$
.
support
.
transition
.
end
,
function
()
{
$next
.
removeClass
([
type
,
direction
].
join
(
'
'
)).
addClass
(
'
active
'
)
$next
.
removeClass
([
type
,
direction
].
join
(
'
'
)).
addClass
(
'
active
'
)
$active
.
removeClass
([
'
active
'
,
direction
].
join
(
'
'
))
$active
.
removeClass
([
'
active
'
,
direction
].
join
(
'
'
))
...
...
js/tests/unit/tooltip.js
View file @
eaefed51
...
@@ -181,6 +181,51 @@ $(function () {
...
@@ -181,6 +181,51 @@ $(function () {
},
100
)
},
100
)
})
})
test
(
"
should wait 200 ms before hiding the tooltip
"
,
3
,
function
()
{
var
tooltip
=
$
(
'
<a href="#" rel="tooltip" title="Another tooltip"></a>
'
)
.
appendTo
(
'
#qunit-fixture
'
)
.
tooltip
({
delay
:
{
show
:
0
,
hide
:
200
}
})
stop
()
tooltip
.
trigger
(
'
mouseenter
'
)
setTimeout
(
function
()
{
ok
(
$
(
"
.tooltip
"
).
is
(
'
.fade.in
'
),
'
tooltip is faded in
'
)
tooltip
.
trigger
(
'
mouseout
'
)
setTimeout
(
function
()
{
ok
(
$
(
"
.tooltip
"
).
is
(
'
.fade.in
'
),
'
100ms:tooltip is still faded in
'
)
setTimeout
(
function
()
{
ok
(
!
$
(
"
.tooltip
"
).
is
(
'
.in
'
),
'
tooltip removed
'
)
start
()
},
150
)
},
100
)
},
1
)
})
test
(
"
should not hide tooltip if leave event occurs, then tooltip is show immediately again
"
,
function
()
{
var
tooltip
=
$
(
'
<a href="#" rel="tooltip" title="Another tooltip"></a>
'
)
.
appendTo
(
'
#qunit-fixture
'
)
.
tooltip
({
delay
:
{
show
:
0
,
hide
:
200
}
})
stop
()
tooltip
.
trigger
(
'
mouseenter
'
)
setTimeout
(
function
()
{
ok
(
$
(
"
.tooltip
"
).
is
(
'
.fade.in
'
),
'
tooltip is faded in
'
)
tooltip
.
trigger
(
'
mouseout
'
)
setTimeout
(
function
()
{
ok
(
$
(
"
.tooltip
"
).
is
(
'
.fade.in
'
),
'
100ms:tooltip is still faded in
'
)
tooltip
.
trigger
(
'
mouseenter
'
)
setTimeout
(
function
()
{
ok
(
$
(
"
.tooltip
"
).
is
(
'
.in
'
),
'
tooltip removed
'
)
start
()
},
150
)
},
100
)
},
1
)
})
test
(
"
should not show tooltip if leave event occurs before delay expires
"
,
function
()
{
test
(
"
should not show tooltip if leave event occurs before delay expires
"
,
function
()
{
var
tooltip
=
$
(
'
<a href="#" rel="tooltip" title="Another tooltip"></a>
'
)
var
tooltip
=
$
(
'
<a href="#" rel="tooltip" title="Another tooltip"></a>
'
)
.
appendTo
(
'
#qunit-fixture
'
)
.
appendTo
(
'
#qunit-fixture
'
)
...
...
js/tooltip.js
View file @
eaefed51
...
@@ -102,10 +102,10 @@
...
@@ -102,10 +102,10 @@
var
self
=
obj
instanceof
this
.
constructor
?
var
self
=
obj
instanceof
this
.
constructor
?
obj
:
$
(
obj
.
currentTarget
)[
this
.
type
](
options
).
data
(
'
bs.
'
+
this
.
type
)
obj
:
$
(
obj
.
currentTarget
)[
this
.
type
](
options
).
data
(
'
bs.
'
+
this
.
type
)
if
(
!
self
.
options
.
delay
||
!
self
.
options
.
delay
.
show
)
return
self
.
show
()
clearTimeout
(
self
.
timeout
)
clearTimeout
(
self
.
timeout
)
if
(
!
self
.
options
.
delay
||
!
self
.
options
.
delay
.
show
)
return
self
.
show
()
self
.
hoverState
=
'
in
'
self
.
hoverState
=
'
in
'
self
.
timeout
=
setTimeout
(
function
()
{
self
.
timeout
=
setTimeout
(
function
()
{
if
(
self
.
hoverState
==
'
in
'
)
self
.
show
()
if
(
self
.
hoverState
==
'
in
'
)
self
.
show
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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