Skip to content

Commit

Permalink
Position: Use absolute positioning when getting scrollbar width to av…
Browse files Browse the repository at this point in the history
…oid reflows of user content. Fixes #9291 - Position - $.position.scrollbarWidth detection causes layout issues.
  • Loading branch information
scottgonzalez committed May 16, 2013
1 parent 0da5f99 commit d500e94
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ui/jquery.ui.position.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
Expand Down

0 comments on commit d500e94

Please sign in to comment.