Open Bug 1659515 Opened 4 years ago Updated 2 years ago

CSS table column (col, th or td) resize (horizontal) doesn't work. Should (also) respect min & max width values

Categories

(Core :: Layout: Tables, defect)

79 Branch
defect

Tracking

()

UNCONFIRMED
Webcompat Priority P2

People

(Reporter: maurice, Unassigned)

References

(Depends on 1 open bug)

Details

Attachments

(2 files)

User Agent: Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:79.0) Gecko/20100101 Firefox/79.0

Steps to reproduce:

Set CSS resize: horizontal via a class for (respectively) a (1) col, (2) hd and(3) td of an HTML table, combined with overflow: auto. Also tried (4) putting a DIV within the TH cells.

Actual results:

1,2 & 3 above do not work at all. 4 (DIV workaround) resizes the content and with it the table column, but then does not respect the min & max width settings on the column. The problem occurs across all desktop and mobile devices.

Expected results:

Every HTML table header cell with this css setting should have an interface element for the user to be able to resize the column within/between the min and max width settings for every specific column (set via css/styling for the table col elements or the table cell/td elements).

(2) hd - should be: (2) th

Bugbug thinks this bug should belong to this component, but please revert this change in case of error.

Component: Untriaged → Layout
Product: Firefox → Core

Can you attach an HTML file that reproduces the issue? Thank you.

Component: Layout → Layout: Tables
Flags: needinfo?(maurice)
Attached file 111490.html (deleted) —

I came across this issue in https://github.com/webcompat/web-bugs/issues/111490 where it's possible to resize table header columns in Chrome, but not in Firefox in Google BigQuery console. Chrome has handlers on the <th> elements (as long as overflow value is set to auto\hidden\scroll) that allow to resize the columns.

In this testcase, text in one of the columns is very long and it's impossible to read it without resizing the header.

Attached file 111490-min.html (deleted) —

It's possible to resize <td> elements in Chrome as well (this is an example with max-width set on both the table cell and table cell header).

Flags: needinfo?(maurice)
Webcompat Priority: --- → ?
Webcompat Priority: ? → P2

This might just be a version of bug 221154, "table cells do not support 'overflow' correctly".

(The testcase uses overflow:hidden on a th which is a special type of table cell.)

Severity: -- → S3
Depends on: 221154

(In reply to Daniel Holbert [:dholbert] from comment #6)

This might just be a version of bug 221154, "table cells do not support 'overflow' correctly".

(The testcase uses overflow:hidden on a th which is a special type of table cell.)

I don't think so. This bug is about being able to dynamically resize table columns by clicking and dragging when col, th, or td elements have resize: horizontal CSS specified.

What Daniel wanted to say is that resize is conditional on the element being a scroll container. Table cells are not scroll containers because of bug 221154, thus fixing bug 221154 will also fix this.

Indeed -- thanks for the clarification, emilio.

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: