Bug 15758 - div in th inherits offsetLeft
Summary: div in th inherits offsetLeft
Status: RESOLVED CONFIGURATION CHANGED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tables (show other bugs)
Version: 523.x (Safari 3)
Hardware: PC OS X 10.4
: P2 Normal
Assignee: Nobody
URL:
Keywords: HasReduction
Depends on:
Blocks:
 
Reported: 2007-10-29 17:27 PDT by Garrett Smith
Modified: 2022-08-13 09:46 PDT (History)
5 users (show)

See Also:


Attachments
example showing the DIV's offsetLeft in an alert box (1.89 KB, text/html)
2007-10-29 17:29 PDT, Garrett Smith
no flags Details
Safari 15.6 matches with other browsers (779.86 KB, image/png)
2022-08-13 09:46 PDT, Ahmad Saleem
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Garrett Smith 2007-10-29 17:27:09 PDT
If a div is in a th, it inherits the TH's offsetLeft.

This actually happens in other browsers, but not if the th has position: relative. 

If the TH does not have position: relative, the TD should not inherit offsetLeft. (to be cross browser)
Comment 1 Garrett Smith 2007-10-29 17:29:02 PDT
Created attachment 16939 [details]
example showing the DIV's offsetLeft in an alert box
Comment 2 Dave Hyatt 2007-10-29 20:29:00 PDT
This should be double-checked against WinIE.
Comment 3 Garrett Smith 2007-11-01 00:04:16 PDT
IE7 I get offsetLeft = 1 
Opera 9.2 offsetLeft = 2

Firefox is the same as IE - 1.

The difference in opera / ff / ie may be the border-spacing or may be the border-width (clientWidth).

Comment 4 Ahmad Saleem 2022-08-13 09:46:36 PDT
Created attachment 461581 [details]
Safari 15.6 matches with other browsers

I am not able to reproduce this bug in Safari 15.6 using attached test case and it seems that all browsers match in rendering as can be seen in screenshot.

I am going to mark this as "RESOLVED CONFIGURATION CHANGED". Please reopen if someone thinks it is not fixed. Thanks!