]> source.dussan.org Git - jquery-ui.git/commitdiff
Position: Use absolute positioning when getting scrollbar width to avoid reflows...
authorScott González <scott.gonzalez@gmail.com>
Thu, 16 May 2013 12:34:04 +0000 (08:34 -0400)
committerScott González <scott.gonzalez@gmail.com>
Thu, 16 May 2013 12:34:04 +0000 (08:34 -0400)
ui/jquery.ui.position.js

index 2d3451c0693fd4050039bf5bb98bbf99a5a632f3..d45b24bb168c0752eee0b5de60b779d9e04ae8d6 100644 (file)
@@ -70,7 +70,7 @@ $.position = {
                        return cachedScrollbarWidth;
                }
                var w1, w2,
-                       div = $( "<div style='display:block;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>" ),
+                       div = $( "<div style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>" ),
                        innerDiv = div.children()[0];
 
                $( "body" ).append( div );