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
82ff4e2e
Commit
82ff4e2e
authored
11 years ago
by
fat
Browse files
Options
Download
Email Patches
Plain Diff
tooltip subpixel test fixes
parent
3b2418e6
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
js/tests/unit/tooltip.js
+6
-2
js/tests/unit/tooltip.js
with
6 additions
and
2 deletions
+6
-2
js/tests/unit/tooltip.js
+
6
-
2
View file @
82ff4e2e
...
...
@@ -332,7 +332,7 @@ $(function () {
var
tooltip
=
container
.
find
(
'
.tooltip
'
)
start
()
ok
(
tooltip
.
offset
().
top
+
tooltip
.
outerHeight
()
<=
tooltiped
.
offset
().
top
)
ok
(
Math
.
round
(
tooltip
.
offset
().
top
+
tooltip
.
outerHeight
()
)
<=
Math
.
round
(
tooltiped
.
offset
().
top
)
container
.
remove
()
},
100
)
})
...
...
@@ -347,7 +347,11 @@ $(function () {
.
tooltip
(
'
show
'
),
tooltip
=
container
.
find
(
'
.tooltip
'
)
ok
(
Math
.
round
(
target
.
offset
().
top
+
(
target
[
0
].
offsetHeight
/
2
)
-
(
tooltip
[
0
].
offsetHeight
/
2
))
===
Math
.
round
(
tooltip
.
offset
().
top
)
)
// this is some dumb hack shit because sub pixels in firefox
var
top
=
Math
.
round
(
target
.
offset
().
top
+
(
target
[
0
].
offsetHeight
/
2
)
-
(
tooltip
[
0
].
offsetHeight
/
2
))
var
top2
=
Math
.
round
(
tooltip
.
offset
().
top
)
var
topDiff
=
top
-
top2
ok
(
topDiff
<=
1
&&
topDiff
>=
-
1
)
target
.
tooltip
(
'
hide
'
)
})
...
...
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