X Tutup
Skip to content

Commit 861476e

Browse files
mpetrovichmikesherov
authored andcommitted
Fixes #11635, Explicit overflow:auto is overridden by inline overflow:hidden during animation, closes jquerygh-981
1 parent 69ce829 commit 861476e

File tree

4 files changed

+30
-2
lines changed

4 files changed

+30
-2
lines changed

src/sizzle

src/support.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ jQuery.support = (function() {
172172
// Run tests that need a body at doc ready
173173
jQuery(function() {
174174
var container, div, tds, marginDiv,
175-
divReset = "padding:0;margin:0;border:0;display:block;overflow:hidden;",
175+
divReset = "padding:0;margin:0;border:0;display:block;overflow:hidden;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;",
176176
body = document.getElementsByTagName("body")[0];
177177

178178
if ( !body ) {
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr" id="html">
3+
<head>
4+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
5+
<style>
6+
* {
7+
-webkit-box-sizing: border-box;
8+
-moz-box-sizing: border-box;
9+
box-sizing: border-box;
10+
}
11+
</style>
12+
</head>
13+
<body>
14+
<div>
15+
<script src="../../../dist/jquery.js"></script>
16+
</div>
17+
<script>
18+
jQuery(function() {
19+
window.parent.iframeCallback( jQuery.support.shrinkWrapBlocks );
20+
});
21+
</script>
22+
</body>
23+
</html>

test/unit/support.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,11 @@ testIframeWithCallback( "A background on the testElement does not cause IE8 to c
3838
ok( true, "IE8 does not crash" );
3939
});
4040

41+
testIframeWithCallback( "box-sizing does not affect jQuery.support.shrinkWrapBlocks", "support/shrinkWrapBlocks.html", function( shrinkWrapBlocks ) {
42+
expect( 1 );
43+
strictEqual( shrinkWrapBlocks, jQuery.support.shrinkWrapBlocks, "jQuery.support.shrinkWrapBlocks properties are the same" );
44+
});
45+
4146
(function() {
4247

4348
var userAgent = window.navigator.userAgent,

0 commit comments

Comments
 (0)
X Tutup