Open Bug 1667786 Opened 4 years ago Updated 4 years ago

Exporting selected table cells of `<thead>`/`<tfoot>` and `<tbody>` exports all of them to `<thead>`/`<tbody>`

Categories

(Core :: DOM: Serializers, defect, P3)

defect

Tracking

()

People

(Reporter: mbrodesser-Igalia, Unassigned)

References

(Blocks 1 open bug)

Details

Happened on Ubuntu 18.04, with Nightly. Very likely not a recent regression.

STR:

  1. Open a page with some table containing <thead> and <tbody>, e.g. this.

  2. Ctrl+Click on all cells of the table.

  3. Tap Ctrl+c to export the selection to the clipboard.

Expected:
the clipboard contains the header rows in <thead> and the body rows in <tbody>.

Actual:
all rows are in <tbody>:

"text/html" flavor:

<meta http-equiv="content-type" content="text/html; charset=utf-8"><table><thead><tr><th>Month</th><th>Savings</th></tr><tr><td>January</td><td>$100</td></tr><tr><td>February</td><td>$80</td></tr><tr><td>Sum</td><td>$180</td></tr></thead></table>

This sometimes works when drag-selecting the whole table, but at other times not. It seems it depends on the surrounding items and where exactly the clicks are happening.

Analogous problem when selecting a row in <tbody> and <tfoot>: all selected rows get exported to <tbody>.

Blocks: 1636028
Summary: Exporting click-selected table cells of `<thead>` and `<tbody>` exports all of them to `<thead>` → Exporting selected table cells of `<thead>` and `<tbody>` exports all of them to `<thead>`

((bug 1639972 is a S3 bug, so I assume this is also S3, feel free to change if you have different opinion.))

Severity: -- → S3
Priority: -- → P3
Summary: Exporting selected table cells of `<thead>` and `<tbody>` exports all of them to `<thead>` → Exporting selected table cells of `<thead>`/`<tfoot>` and `<tbody>` exports all of them to `<thead>`/`<tbody>`
You need to log in before you can comment on or make changes to this bug.