Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
J
jquery
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
夏彬
jquery
Commits
94924a05
Commit
94924a05
authored
Jul 20, 2012
by
Corey Frang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix the logic to set overflow:hidden on width & height animations - Fixes #12117 - Closes gh-869
parent
30168722
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
1 deletion
+15
-1
effects.js
src/effects.js
+1
-1
effects.js
test/unit/effects.js
+14
-0
No files found.
src/effects.js
View file @
94924a05
...
@@ -269,7 +269,7 @@ function defaultPrefilter( elem, props, opts ) {
...
@@ -269,7 +269,7 @@ function defaultPrefilter( elem, props, opts ) {
}
}
// height/width overflow pass
// height/width overflow pass
if
(
elem
.
nodeType
===
1
&&
(
props
.
height
||
props
.
width
)
)
{
if
(
elem
.
nodeType
===
1
&&
(
"height"
in
props
||
"width"
in
props
)
)
{
// Make sure that nothing sneaks out
// Make sure that nothing sneaks out
// Record all 3 overflow attributes because IE does not
// Record all 3 overflow attributes because IE does not
// change the overflow attribute when overflowX and
// change the overflow attribute when overflowX and
...
...
test/unit/effects.js
View file @
94924a05
...
@@ -1785,4 +1785,18 @@ asyncTest("Animation callbacks (#11797)", 15, function() {
...
@@ -1785,4 +1785,18 @@ asyncTest("Animation callbacks (#11797)", 15, function() {
});
});
});
});
test
(
"Animate properly sets overflow hidden when animating width/height (#12117)"
,
4
,
function
()
{
jQuery
.
each
(
[
"height"
,
"width"
],
function
(
_
,
prop
)
{
jQuery
.
each
(
[
100
,
0
],
function
(
_
,
value
)
{
var
div
=
jQuery
(
"<div>"
),
props
=
{};
props
[
prop
]
=
value
;
div
.
animate
(
props
,
1
);
equal
(
div
.
css
(
"overflow"
),
"hidden"
,
"overflow: hidden set when animating "
+
prop
+
" to "
+
value
);
div
.
stop
();
});
});
});
}
// if ( jQuery.fx )
}
// if ( jQuery.fx )
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