Open Bug 1572483 Opened 6 years ago Updated 1 year ago

wrong td width, box-sizing: border-box bug

Categories

(Core :: Layout: Tables, defect, P3)

defect

Tracking

()

People

(Reporter: 1.1.1998, Unassigned)

Details

Attachments

(4 files, 1 obsolete file)

Attached file td.html

User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.143 YaBrowser/19.7.2.455 Yowser/2.5 Safari/537.36

Steps to reproduce:

try make width in th and td tags equals.
new width = where width more(td\th).

Actual results:

  • get width th
    document.querySelector('th').offsetWidth

62

  • get width td
    document.querySelector('td').offsetWidth

36

  • set td width to 62px
    document.querySelector('td').style.width = "62px"
  • get width td
    document.querySelector('td').offsetWidth

74

Expected results:

  • get width th
    document.querySelector('th').offsetWidth

62

  • get width td
    document.querySelector('td').offsetWidth

36

  • set td width to 62px
    document.querySelector('td').style.width = "62px"
  • get width td
    document.querySelector('td').offsetWidth

62

Component: Untriaged → DOM: CSS Object Model
Product: Firefox → Core

this bug Firefox or Chrome?
Firefox

Chrome

Attached image 2019-08-08_184628.png

Firefox console

Attached image 2019-08-08_185316.png

Chrome console

Summary: wrong td width → wrong td width?

found true bug)
in Chrome disable style
*{
box-sizing:border-box;
}
got console log like in Firefox

Attached image 2019-08-08_190707.png

Chrome console without box-sizing:border-box;

Summary: wrong td width? → wrong td width? box-sizing:border-box bug
Component: DOM: CSS Object Model → Layout: Tables

Yeah, it seems <td> is not accounting for box-sizing properly.

OS: Unspecified → All
Hardware: Unspecified → All
Version: unspecified → 68 Branch
Summary: wrong td width? box-sizing:border-box bug → wrong td width, box-sizing: border-box bug

The priority flag is not set for this bug.
:mats, could you have a look please?

For more information, please visit auto_nag documentation.

Flags: needinfo?(mats)
Status: UNCONFIRMED → NEW
Ever confirmed: true
Flags: needinfo?(mats)
Priority: -- → P3
Version: 68 Branch → unspecified
Severity: normal → S3
Attachment #9381494 - Attachment is obsolete: true
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: