Bug 48975

Summary: wrong elements width when vertical scrollbar added to dynamicaly expanding float div
Product: WebKit Reporter: Alex Efros <powerman-asdf>
Component: CSSAssignee: Nobody <webkit-unassigned>
Status: RESOLVED CONFIGURATION CHANGED    
Severity: Normal CC: ahmad.saleem792, ap, bfulgham, rniwa, simon.fraser
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: OS X 10.6   
Attachments:
Description Flags
example html with bug none

Alex Efros
Reported 2010-11-03 22:01:04 PDT
Created attachment 72905 [details] example html with bug This bug exists in both latest browsers: webkit 533.18.1 (Safari 5.0.2/MacOS 10.6.4) and webkit 534.7 (Chromium 7.0.517.41/Linux). While implementing scrollable tbody I have two div around table (-outer and -inner). Outer div for {position:relative}, inner for {height:XXpx; overflow-y:scroll}. When width of outer div known and fixed (either XXXpx or 100%), vertical scrollbar positioned correctly and inside table all elements has correct width. But if width of this tbody-scrollable table should be dynamic, and without hardcoded scrollbar width (because it differ in other OS/browsers), and outer div made float:left, then IN MOST CASES when page loaded scrollbar positioned incorrectly (inside table) and width of some elements in table also incorrect (even for elements with fixed width in px set in css). Example html attached (I used div and p instead of table/thead/tbody there for simplicity). This issue may (or may not) be same as in bug 17309. Most interesting effect with this bug is how to fix it: just "reset" css rules! For example, in web inspector, just switch off ANY css rule on ANY element, even just "color" on some unrelated element - scrollbar position and other wrong elements width immediately will be fixed. Next operations in web inspector (like switching that css rule back on) has no effect (scrollbar still in correct position). This workaround also can be simulated in JS (using jQuery as helper): if ($.browser.webkit) setTimeout(function(){ $("<style></style>").appendTo("head").remove(); }, 0);
Attachments
example html with bug (1.59 KB, text/html)
2010-11-03 22:01 PDT, Alex Efros
no flags
Ahmad Saleem
Comment 1 2022-07-23 08:00:18 PDT
This test case render same across all browsers and I am not able to see case where the scrollbar is rendered inside table elements as referred in Comment 0. Since all browsers (Safari 15.6 on macOS 12.5, Chrome Canary 106 and Firefox Nightly 104) match each other, I think this can be considered as "RESOLVED WONTFIX" or "RESOLVED INVALID" - if it is fixed along the way then it can be "RESOLVED CONFIGURATION CHANGED". If I am testing incorrectly, please test accordingly. Thanks!
Note You need to log in before you can comment on or make changes to this bug.