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
3f9f2b1d
Commit
3f9f2b1d
authored
Jan 27, 2013
by
Dave Methvin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix #12846. Restore overflow when animation is stopped.
(Cherry picked from
a6c358d0
)
parent
74aa3eb7
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
3 deletions
+5
-3
effects.js
src/effects.js
+1
-1
effects.js
test/unit/effects.js
+4
-2
No files found.
src/effects.js
View file @
3f9f2b1d
...
@@ -303,7 +303,7 @@ function defaultPrefilter( elem, props, opts ) {
...
@@ -303,7 +303,7 @@ function defaultPrefilter( elem, props, opts ) {
if
(
opts
.
overflow
)
{
if
(
opts
.
overflow
)
{
style
.
overflow
=
"hidden"
;
style
.
overflow
=
"hidden"
;
if
(
!
jQuery
.
support
.
shrinkWrapBlocks
)
{
if
(
!
jQuery
.
support
.
shrinkWrapBlocks
)
{
anim
.
done
(
function
()
{
anim
.
always
(
function
()
{
style
.
overflow
=
opts
.
overflow
[
0
];
style
.
overflow
=
opts
.
overflow
[
0
];
style
.
overflowX
=
opts
.
overflow
[
1
];
style
.
overflowX
=
opts
.
overflow
[
1
];
style
.
overflowY
=
opts
.
overflow
[
2
];
style
.
overflowY
=
opts
.
overflow
[
2
];
...
...
test/unit/effects.js
View file @
3f9f2b1d
...
@@ -1787,16 +1787,18 @@ asyncTest("Animation callbacks (#11797)", 15, function() {
...
@@ -1787,16 +1787,18 @@ asyncTest("Animation callbacks (#11797)", 15, function() {
});
});
});
});
test
(
"Animate properly sets overflow hidden when animating width/height (#12117)"
,
4
,
function
()
{
test
(
"Animate properly sets overflow hidden when animating width/height (#12117)"
,
8
,
function
()
{
jQuery
.
each
(
[
"height"
,
"width"
],
function
(
_
,
prop
)
{
jQuery
.
each
(
[
"height"
,
"width"
],
function
(
_
,
prop
)
{
jQuery
.
each
(
[
100
,
0
],
function
(
_
,
value
)
{
jQuery
.
each
(
[
100
,
0
],
function
(
_
,
value
)
{
var
div
=
jQuery
(
"<div>"
),
var
div
=
jQuery
(
"<div>"
)
.
css
(
"overflow"
,
"auto"
)
,
props
=
{};
props
=
{};
props
[
prop
]
=
value
;
props
[
prop
]
=
value
;
div
.
animate
(
props
,
1
);
div
.
animate
(
props
,
1
);
equal
(
div
.
css
(
"overflow"
),
"hidden"
,
equal
(
div
.
css
(
"overflow"
),
"hidden"
,
"overflow: hidden set when animating "
+
prop
+
" to "
+
value
);
"overflow: hidden set when animating "
+
prop
+
" to "
+
value
);
div
.
stop
();
div
.
stop
();
equal
(
div
.
css
(
"overflow"
),
"auto"
,
"overflow: auto restored after animating "
+
prop
+
" to "
+
value
);
});
});
});
});
});
});
...
...
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